I’m writing a simple TCP client and server socket program in C.
What I don’t understand is this:
On my client code, it seems having a single socket for both receiving and sending is fine.
But on my server code, I need to have two sockets:
a socket for accepting the connection, and a different one for sending packets to the client.
I don’t understand how this makes sense. If I can both SEND and RECEIVE on side A using a single socket, why can’t I do the same on side B?