MCPcopy Create free account
hub / github.com/ModelEngine-Group/flexai / recv_msg

Function recv_msg

GPU-Virtual-Service/gpu-remoting/src/storage/common.py:89–104  ·  view source on GitHub ↗
(socket)

Source from the content-addressed store, hash-verified

87
88
89def recv_msg(socket):
90 length_data = socket.recv(get_size_t_len())
91 if not length_data:
92 return None
93 msg_len = struct.unpack('Q', length_data)[0]
94 msg_byte = bytearray(msg_len)
95 view = memoryview(msg_byte)
96
97 bytes_received = 0
98 while bytes_received < msg_len:
99 packet_size = socket.recv_into(view[bytes_received:])
100 if not packet_size:
101 return None
102 bytes_received += packet_size
103
104 return pickle.loads(msg_byte)

Callers 2

recv_dataset_metadataMethod · 0.90
handle_clientFunction · 0.90

Calls 1

get_size_t_lenFunction · 0.70

Tested by

no test coverage detected