MCPcopy Create free account
hub / github.com/Bitmessage/PyBitmessage / state_auth_needed

Method state_auth_needed

src/network/socks5.py:64–74  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62 return True
63
64 def state_auth_needed(self):
65 ret = struct.unpack('BB', self.read_buf[0:2])
66 if ret[0] != 1:
67 # general error
68 raise GeneralProxyError(1)
69 if ret[1] != 0:
70 # auth error
71 raise Socks5AuthError(3)
72 # all ok
73 self.set_state("auth_done", length=2)
74 return True
75
76 def state_pre_connect(self):
77 # Get the response

Callers

nothing calls this directly

Calls 3

GeneralProxyErrorClass · 0.90
set_stateMethod · 0.80
Socks5AuthErrorClass · 0.70

Tested by

no test coverage detected