Another question about this.
When a client connects to the server and server accepts via selector, then only client can send data to server right? In order to send data to the client, the server also need to connect to a socket in which that client is listening, right?
What I mean is, each side needs two sockets one for sending and one for receiving? Or TCP is two way?