The above idiom is repeated all over the file. I suggest writing a helper function which handles this, just by writing a local `send_recv` function and then pass `send_recv(Connection, Packet, 0)` and unpack `Connection` inside the function. this way we can probably fold the general scheme into one function.