libmuscle.mcp.tcp_util module¶
- exception libmuscle.mcp.tcp_util.SocketClosed[source]¶
Bases:
Exception
Raised when trying to read from a socket that was closed.
- libmuscle.mcp.tcp_util.recv_all(socket: socket, length: int) bytes [source]¶
Receive length bytes from a socket.
- Parameters
socket – Socket to receive on.
length – Number of bytes to receive.
- Raises
SocketClosed – If the socket was closed by the peer.
RuntimeError – If a read error occurred.
- libmuscle.mcp.tcp_util.recv_int64(socket: socket) int [source]¶
Receives an int as a 64-bit signed little endian number.
- Parameters
socket – The socket to receive on.
- Raises
SocketClosed – If the socket was closed by the peer.
RuntimeError – If a read error occurred.