summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/filesocket.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2010-01-25 10:40:44 -0800
committerNathan Fritz <fritzy@netflint.net>2010-01-25 10:40:44 -0800
commit6e4c1128ec8f01d31c7714c13db02ff20c7a0a40 (patch)
treeed4106411254e5682f7435a8c970a22d8e324d63 /sleekxmpp/xmlstream/filesocket.py
parent6e1aa0690f4c2bcc1031aed05305ef84f36fbb57 (diff)
downloadslixmpp-6e4c1128ec8f01d31c7714c13db02ff20c7a0a40.tar.gz
slixmpp-6e4c1128ec8f01d31c7714c13db02ff20c7a0a40.tar.bz2
slixmpp-6e4c1128ec8f01d31c7714c13db02ff20c7a0a40.tar.xz
slixmpp-6e4c1128ec8f01d31c7714c13db02ff20c7a0a40.zip
removed stupid monkeypatch for filesocket
Diffstat (limited to 'sleekxmpp/xmlstream/filesocket.py')
-rw-r--r--sleekxmpp/xmlstream/filesocket.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/filesocket.py b/sleekxmpp/xmlstream/filesocket.py
index 92d61e61..580c43f0 100644
--- a/sleekxmpp/xmlstream/filesocket.py
+++ b/sleekxmpp/xmlstream/filesocket.py
@@ -1,8 +1,18 @@
from socket import _fileobject
+import socket
class filesocket(_fileobject):
- def read(self, size=-1):
+ def read(self, size=4096):
data = self._sock.recv(size)
if data is not None:
return data
+
+class Socket26(socket._socketobject):
+
+ def makefile(self, mode='r', bufsize=-1):
+ """makefile([mode[, bufsize]]) -> file object
+ Return a regular file object corresponding to the socket. The mode
+ and bufsize arguments are as for the built-in open() function."""
+ return filesocket(self._sock, mode, bufsize)
+