Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_telnetlib.SocketStub Class Reference
Inheritance diagram for test.test_telnetlib.SocketStub:
Inheritance graph
Collaboration diagram for test.test_telnetlib.SocketStub:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def sendall
def recv

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

a socket proxy that re-defines sendall() 

Definition at line 80 of file

Constructor & Destructor Documentation

def test.test_telnetlib.SocketStub.__init__ (   self,
  reads = [] 

Definition at line 82 of file

00083     def __init__(self, reads=[]):
00084         self.reads = reads
00085         self.writes = []
        self.block = False

Here is the caller graph for this function:

Member Function Documentation

def test.test_telnetlib.SocketStub.recv (   self,

Definition at line 88 of file

00089     def recv(self, size):
00090         out = b''
00091         while self.reads and len(out) < size:
00092             out += self.reads.pop(0)
00093         if len(out) > size:
00094             self.reads.insert(0, out[size:])
00095             out = out[:size]
00096         return out

Here is the caller graph for this function:

def test.test_telnetlib.SocketStub.sendall (   self,

Definition at line 86 of file

00087     def sendall(self, data):

Member Data Documentation

Definition at line 85 of file

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 83 of file

Definition at line 84 of file

The documentation for this class was generated from the following file: