Using a queue for host->target data to ensure that data can be safely sent in the hook_data_received.
Tidy up and fixing the fact that there needs to be a remaining count and buffer per socket.