I am writing a client-server application(TCP protocol) in C++.  

I have possibility where a client can receive data from multiple servers.  

To tackle this, I have created a socket connections list. 

In a loop, on each socket, I perform following: 

* try to receive data on this on socket
* put this in a buffer
* process buffer data
* clear buffer
* perform same steps for next socket

Now in my design, initially I had created a common buffer for all connections. But I am suggested that in case of heavy load on network, it may happen that received telegram is not complete telegram, it may be a part of a telegram. so to make a telegram complete I will have to wait for next iteration for same socket and even clubbing/identifying telegrams will be a complex process.

To handle this scenario, one solution may be to provide dedicated buffer for each connection. 

Can anybody suggest more optimized/better solution to avoid creating dedicated buffer for each connection?