Issue 11177: asyncore's create_socket() arguments can now be omitted.

This commit is contained in:
Giampaolo Rodolà 2011-02-25 22:21:22 +00:00
parent 0bd4deba38
commit 103a6d6cd6
4 changed files with 18 additions and 14 deletions

View file

@ -287,7 +287,7 @@ class dispatcher:
del map[fd]
self._fileno = None
def create_socket(self, family, type):
def create_socket(self, family=socket.AF_INET, type=socket.SOCK_STREAM):
self.family_and_type = family, type
sock = socket.socket(family, type)
sock.setblocking(0)