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

Method state_init

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

Source from the content-addressed store, hash-verified

31 self.destport = address[1]
32
33 def state_init(self):
34 if self._auth:
35 self.append_write_buf(struct.pack('BBBB', 0x05, 0x02, 0x00, 0x02))
36 else:
37 self.append_write_buf(struct.pack('BBB', 0x05, 0x01, 0x00))
38 self.set_state("auth_1", length=0, expectBytes=2)
39 return True
40
41 def state_auth_1(self):
42 ret = struct.unpack('BB', self.read_buf)

Callers 1

handle_connectMethod · 0.45

Calls 2

append_write_bufMethod · 0.80
set_stateMethod · 0.80

Tested by

no test coverage detected