twisted.internet.test.test_tcp.FakeSocket(object) class documentationtwisted.internet.test.test_tcp
(View In Hierarchy)
A fake for socket.socket
objects.
| Instance Variable | data | A strgiving the data which will be returned fromFakeSocket.recv. | 
| Instance Variable | sendBuffer | A listof the objects passed toFakeSocket.send. | 
| Method | __init__ | Undocumented | 
| Method | setblocking | Undocumented | 
| Method | recv | Undocumented | 
| Method | send | Send all of bytesby accumulating it intoself.sendBuffer. | 
| Method | shutdown | Shutdown is not implemented.  The method is provided since real sockets 
have it and some code expects it.  No behavior of FakeSocketis affected by a call to it. | 
| Method | close | Close is not implemented.  The method is provided since real sockets 
have it and some code expects it.  No behavior of FakeSocketis affected by a call to it. | 
| Method | setsockopt | Setsockopt is not implemented.  The method is provided since real 
sockets have it and some code expects it.  No behavior of FakeSocketis affected by a call to it. | 
| Method | fileno | Return a fake file descriptor.  If actually used, this will have no 
connection to this FakeSocketand will probably cause surprising results. | 
Send all of bytes by accumulating it into 
self.sendBuffer.
| Returns | The length of bytes, indicating all the data has been 
accepted. | |
Shutdown is not implemented.  The method is provided since real sockets 
have it and some code expects it.  No behavior of FakeSocket
is affected by a call to it.
Close is not implemented.  The method is provided since real sockets 
have it and some code expects it.  No behavior of FakeSocket
is affected by a call to it.
Setsockopt is not implemented.  The method is provided since real 
sockets have it and some code expects it.  No behavior of FakeSocket
is affected by a call to it.
Return a fake file descriptor.  If actually used, this will have no 
connection to this FakeSocket
and will probably cause surprising results.