I am using boost asio to develop a tcp server process which listens for client connections. The clients are expected to send partial packets. Server process can't process the packet until it receives the entire packet from the client (header,data and footer).
In order to handle partial packets, server process needs to push the packets( or partial packets) from each client connection to a queue. Server would maintain a queue per client connection.
Now my question is how to get a socket file descriptor when using boost asio. I am planning to use the integer value from socket file descriptor and create a std::map container that handles queue per client connection.
std::map< int, std::deque< std::string >
If retrieving socket file descriptor is not feasible what could be the alternatives for optimal performance. Do I need to use
std::map< tcp::socket *,std::deque< std::string> > ?
Thanks in advance.