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 str giving the data which will be returned from FakeSocket.recv . |
Instance Variable | sendBuffer | A list of the objects passed to FakeSocket.send . |
Method | __init__ | Undocumented |
Method | setblocking | Undocumented |
Method | recv | Undocumented |
Method | send | Send all of bytes by accumulating it into
self.sendBuffer . |
Method | shutdown | 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. |
Method | close | 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. |
Method | setsockopt | 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. |
Method | fileno | Return a fake file descriptor. If actually used, this will have no
connection to this FakeSocket
and 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.