Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Side by Side Diff: Doc/library/asyncore.rst

Issue 18758: Fix internal references in the documentation
Patch Set: Created 6 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/abc.rst ('k') | Doc/library/audioop.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`asyncore` --- Asynchronous socket handler 1 :mod:`asyncore` --- Asynchronous socket handler
2 =============================================== 2 ===============================================
3 3
4 .. module:: asyncore 4 .. module:: asyncore
5 :synopsis: A base class for developing asynchronous socket handling 5 :synopsis: A base class for developing asynchronous socket handling
6 services. 6 services.
7 .. moduleauthor:: Sam Rushing <rushing@nightmare.com> 7 .. moduleauthor:: Sam Rushing <rushing@nightmare.com>
8 .. sectionauthor:: Christopher Petrilli <petrilli@amber.org> 8 .. sectionauthor:: Christopher Petrilli <petrilli@amber.org>
9 .. sectionauthor:: Steve Holden <sholden@holdenweb.com> 9 .. sectionauthor:: Steve Holden <sholden@holdenweb.com>
10 .. heavily adapted from original documentation by Sam Rushing 10 .. heavily adapted from original documentation by Sam Rushing
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 activates channel service, which continues until the last channel (including 46 activates channel service, which continues until the last channel (including
47 any that have been added to the map during asynchronous service) is closed. 47 any that have been added to the map during asynchronous service) is closed.
48 48
49 49
50 .. function:: loop([timeout[, use_poll[, map[,count]]]]) 50 .. function:: loop([timeout[, use_poll[, map[,count]]]])
51 51
52 Enter a polling loop that terminates after count passes or all open 52 Enter a polling loop that terminates after count passes or all open
53 channels have been closed. All arguments are optional. The *count* 53 channels have been closed. All arguments are optional. The *count*
54 parameter defaults to None, resulting in the loop terminating only when all 54 parameter defaults to None, resulting in the loop terminating only when all
55 channels have been closed. The *timeout* argument sets the timeout 55 channels have been closed. The *timeout* argument sets the timeout
56 parameter for the appropriate :func:`select` or :func:`poll` call, measured 56 parameter for the appropriate :func:`~select.select` or :func:`~select.poll` call, measured
57 in seconds; the default is 30 seconds. The *use_poll* parameter, if true, 57 in seconds; the default is 30 seconds. The *use_poll* parameter, if true,
58 indicates that :func:`poll` should be used in preference to :func:`select` 58 indicates that :func:`~select.poll` should be used in preference to :func:`~s elect.select`
59 (the default is ``False``). 59 (the default is ``False``).
60 60
61 The *map* parameter is a dictionary whose items are the channels to watch. 61 The *map* parameter is a dictionary whose items are the channels to watch.
62 As channels are closed they are deleted from their map. If *map* is 62 As channels are closed they are deleted from their map. If *map* is
63 omitted, a global map is used. Channels (instances of 63 omitted, a global map is used. Channels (instances of
64 :class:`asyncore.dispatcher`, :class:`asynchat.async_chat` and subclasses 64 :class:`asyncore.dispatcher`, :class:`asynchat.async_chat` and subclasses
65 thereof) can freely be mixed in the map. 65 thereof) can freely be mixed in the map.
66 66
67 67
68 .. class:: dispatcher() 68 .. class:: dispatcher()
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 self.set_reuse_addr() 333 self.set_reuse_addr()
334 self.bind((host, port)) 334 self.bind((host, port))
335 self.listen(5) 335 self.listen(5)
336 336
337 def handle_accepted(self, sock, addr): 337 def handle_accepted(self, sock, addr):
338 print('Incoming connection from %s' % repr(addr)) 338 print('Incoming connection from %s' % repr(addr))
339 handler = EchoHandler(sock) 339 handler = EchoHandler(sock)
340 340
341 server = EchoServer('localhost', 8080) 341 server = EchoServer('localhost', 8080)
342 asyncore.loop() 342 asyncore.loop()
OLDNEW
« no previous file with comments | « Doc/library/abc.rst ('k') | Doc/library/audioop.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+