MCPcopy Index your code
hub / github.com/python/cpython / _SocketWriter

Class _SocketWriter

Lib/socketserver.py:830–847  ·  view source on GitHub ↗

Simple writable BufferedIOBase implementation for a socket Does not hold data in a buffer, avoiding any need to call flush().

Source from the content-addressed store, hash-verified

828 self.rfile.close()
829
830class _SocketWriter(BufferedIOBase):
831 """Simple writable BufferedIOBase implementation for a socket
832
833 Does not hold data in a buffer, avoiding any need to call flush()."""
834
835 def __init__(self, sock):
836 self._sock = sock
837
838 def writable(self):
839 return True
840
841 def write(self, b):
842 self._sock.sendall(b)
843 with memoryview(b) as view:
844 return view.nbytes
845
846 def fileno(self):
847 return self._sock.fileno()
848
849class DatagramRequestHandler(BaseRequestHandler):
850

Callers 1

setupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…