summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-01 21:18:52 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-01 21:18:52 (GMT)
commit7f0c3ffad5a24a684728464c29e00dc47b3e8864 (patch)
tree8472a213492324af0b5465ef31387d6a5e72757e /Lib/asyncore.py
parentf89972b3dabb50b637477c771638cef43cb5d38c (diff)
downloadcpython-7f0c3ffad5a24a684728464c29e00dc47b3e8864.zip
cpython-7f0c3ffad5a24a684728464c29e00dc47b3e8864.tar.gz
cpython-7f0c3ffad5a24a684728464c29e00dc47b3e8864.tar.bz2
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. ........
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 3e3907e..c23c8aa 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -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