mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
Merged revisions 83201 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83201 | georg.brandl | 2010-07-28 10:19:35 +0200 (Mi, 28 Jul 2010) | 1 line #9354: Provide getsockopt() in asyncore file_wrapper(). Patch by Lukas Langa. ........
This commit is contained in:
parent
f89972b3da
commit
7f0c3ffad5
4 changed files with 25 additions and 1 deletions
|
@ -607,6 +607,14 @@ if os.name == 'posix':
|
|||
def send(self, *args):
|
||||
return os.write(self.fd, *args)
|
||||
|
||||
def getsockopt(self, level, optname, buflen=None):
|
||||
if (level == socket.SOL_SOCKET and
|
||||
optname == socket.SO_ERROR and
|
||||
not buflen):
|
||||
return 0
|
||||
raise NotImplementedError("Only asyncore specific behaviour "
|
||||
"implemented.")
|
||||
|
||||
read = recv
|
||||
write = send
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue