Python 2.6 File Socket Shims¶
- class sleekxmpp.xmlstream.filesocket.FileSocket(sock, mode='rb', bufsize=-1, close=False)¶
Create a file object wrapper for a socket to work around issues present in Python 2.6 when using sockets as file objects.
The parser for cElementTree requires a file, but we will be reading from the XMPP connection socket instead.
Read data from the socket as if it were a file.
- class sleekxmpp.xmlstream.filesocket.Socket26(family=2, type=1, proto=0, _sock=None)¶
A custom socket implementation that uses our own FileSocket class to work around issues in Python 2.6 when using sockets as files.
- 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.