class documentation
class FakeSocket: (source)
A fake for socket.socket
objects.
Method | __init__ |
Undocumented |
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 | fileno |
Return a fake file descriptor. If actually used, this will have no connection to this FakeSocket and will probably cause surprising results. |
Method | recv |
Undocumented |
Method | send |
Send all of bytes by accumulating it into self.sendBuffer. |
Method | setblocking |
Undocumented |
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 | 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. |
Instance Variable | blocking |
Undocumented |
Instance Variable | data |
A str giving the data which will be returned from FakeSocket.recv . |
Instance Variable | send |
A list of the objects passed to FakeSocket.send . |
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.
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. |
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.
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.