I want to establish a tcp connection from multiple
clients to the server on the same port at the server.
How do I do that?
Sounds like you’re trying to multiplex the connections at your server. Provided your application can handle more than one client at a time, TCP multiplexing takes care of the networking side of things for you automatically.
Another reader asks:
What is the difference between an IP datagram and a TCP segment?
Mostly, its terminology used in the standards documentation, though upon transmission a TCP segment gets created first from the application layer data and an IP datagram contains the TCP segment in the payload section of the IP datagram. I’ve got lots of tutorials on these subjects in this website.