MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / __recvall

Method __recvall

src/socks/__init__.py:131–144  ·  view source on GitHub ↗

__recvall(count) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received.

(self, count)

Source from the content-addressed store, hash-verified

129 self.__proxypeername = None
130
131 def __recvall(self, count):
132 """__recvall(count) -> data
133 Receive EXACTLY the number of bytes requested from the socket.
134 Blocks until the required number of bytes have been received.
135 """
136 try:
137 data = self.recv(count)
138 except socket.timeout:
139 raise GeneralProxyError((6, "timed out"))
140 while len(data) < count:
141 d = self.recv(count-len(data))
142 if not d: raise GeneralProxyError((0, "connection closed unexpectedly"))
143 data = data + d
144 return data
145
146 def setproxy(self, proxytype=None, addr=None, port=None, rdns=True, username=None, password=None):
147 """setproxy(proxytype, addr[, port[, rdns[, username[, password]]]])

Callers 4

__negotiatesocks5Method · 0.95
__connectsocks5Method · 0.95
__resolvesocks5Method · 0.95
__negotiatesocks4Method · 0.95

Calls 2

GeneralProxyErrorClass · 0.70
recvMethod · 0.45

Tested by

no test coverage detected