MCPcopy
hub / github.com/shadowsocks/shadowsocks / test_pack_header

Function test_pack_header

shadowsocks/common.py:276–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

274
275
276def test_pack_header():
277 assert pack_addr(b'8.8.8.8') == b'\x01\x08\x08\x08\x08'
278 assert pack_addr(b'2404:6800:4005:805::1011') == \
279 b'\x04$\x04h\x00@\x05\x08\x05\x00\x00\x00\x00\x00\x00\x10\x11'
280 assert pack_addr(b'www.google.com') == b'\x03\x0ewww.google.com'
281
282
283def test_ip_network():

Callers 1

common.pyFile · 0.85

Calls 1

pack_addrFunction · 0.85

Tested by

no test coverage detected