MCPcopy Create free account
hub / github.com/ActiveState/code / test_recv

Function test_recv

recipes/Python/577950_Socket_Broadcast_Help/recipe-577950.py:72–76  ·  view source on GitHub ↗

Test the beacon's recv method.

(b)

Source from the content-addressed store, hash-verified

70 time.sleep(1)
71
72def test_recv(b):
73 "Test the beacon's recv method."
74 while True:
75 data, address = b.recv(1 << 12)
76 print('From: {}\n{}\n'.format(address, data.decode()))
77
78################################################################################
79

Callers 1

testFunction · 0.85

Calls 4

printFunction · 0.85
recvMethod · 0.45
formatMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected