From d90aec17e2201f256783a531c548dcc9857c889d Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Fri, 31 Dec 2010 19:19:25 +0100 Subject: Cleanup of repository. Bases of webclient. * remove sleekxmpp (install guideline in server/README) * move server code to server directory * webclient directory with basic strophejs example --- sleekxmpp/xmlstream/filesocket.py | 41 --------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 sleekxmpp/xmlstream/filesocket.py (limited to 'sleekxmpp/xmlstream/filesocket.py') diff --git a/sleekxmpp/xmlstream/filesocket.py b/sleekxmpp/xmlstream/filesocket.py deleted file mode 100644 index 441ff87..0000000 --- a/sleekxmpp/xmlstream/filesocket.py +++ /dev/null @@ -1,41 +0,0 @@ -""" - SleekXMPP: The Sleek XMPP Library - Copyright (C) 2010 Nathanael C. Fritz - This file is part of SleekXMPP. - - See the file LICENSE for copying permission. -""" - -from socket import _fileobject -import socket - - -class FileSocket(_fileobject): - - """ - 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 xml.etree.cElementTree requires a file, but we will - be reading from the XMPP connection socket instead. - """ - - def read(self, size=4096): - """Read data from the socket as if it were a file.""" - data = self._sock.recv(size) - if data is not None: - return data - - -class Socket26(socket._socketobject): - - """ - A custom socket implementation that uses our own FileSocket class - to work around issues in Python 2.6 when using sockets as files. - """ - - 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) -- cgit v1.2.3-70-g09d2