poorconn.PatchableSocket¶
-
class
poorconn.
PatchableSocket
(family=- 1, type=- 1, proto=- 1, fileno=None)¶ Bases:
socket.socket
A class that allows some
socket.socket
functions to be patchable and thus can be wrapped.Many functions such as
socket.socket.accept()
cannot be patched because it is builtin.-
classmethod
create_from
(s)¶ Create a
PatchableSocket
object froms
.- Parameters
s (socket.socket) – The
socket.socket
object to be created from.- Return type
-
classmethod