Hi, I am working on a problem where I have a single TCP (could be UDP as well) connection and I need to route the packets to one of N sockets on the other side depending on the destination. I don't want to block the flow because one of the destinations is down so dropping the packets is OK, the clients can resend.
A simple solution I see in go would be to have one reader goroutine , N writer goroutines and N buffered channels which each handle their timeouts etc. However I want to be able to have a throughput as close as possible to the network interfaces throughput and sending individual packets trough channels seems inefficient. With a 1 to 1 connection I can just allocate one buffer and
27