summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/filesocket.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/filesocket.py b/sleekxmpp/xmlstream/filesocket.py
new file mode 100644
index 00000000..92d61e61
--- /dev/null
+++ b/sleekxmpp/xmlstream/filesocket.py
@@ -0,0 +1,8 @@
+from socket import _fileobject
+
+class filesocket(_fileobject):
+
+ def read(self, size=-1):
+ data = self._sock.recv(size)
+ if data is not None:
+ return data