poorconn.make_socket_patchable¶
-
poorconn.
make_socket_patchable
(s, funcs=(':sending', 'accept'))¶ Make a socket patchable: Create a
PatchableSocket
object if any functions infuncs
are not patchable. This function is not thread-safe even ifs
is returned. Please ensure that no other threads are operating ons
during the execution of this function.- Parameters
s (socket.socket) – The socket to be made patchable.
funcs (Iterable[str]) – Create a
PatchableSocket
object if any functions in it are not patchable.':sending'
means'send'
and'sendall'
, and may include any additional sending methods in the future.
- Return type
socket.socket