MCPcopy Create free account
hub / github.com/ElementsProject/elements / _convert_ip_port

Function _convert_ip_port

test/functional/test_framework/netutil.py:43–52  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

41 return [x for x in array if x !='']
42
43def _convert_ip_port(array):
44 host,port = array.split(':')
45 # convert host from mangled-per-four-bytes form as used by kernel
46 host = bytes.fromhex(host)
47 host_out = ''
48 for x in range(0, len(host) // 4):
49 (val,) = struct.unpack('=I', host[x*4:(x+1)*4])
50 host_out += '%08x' % val
51
52 return host_out,int(port,16)
53
54def netstat(typ='tcp'):
55 '''

Callers 1

netstatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected