When a client wants to estabilish a connection to a server, must the communication always start from the client?
I mean the first step has to be done by client? For instance, I have a client that connects to a server through Socket. The client must send for first a message?
Server can’t know when client wants to connect to it. So, if we’re about Sockets for example in java, client can connect to the server, and server can send a message to this client without a client need to send to server a message first. Here is an example
SERVER:
CLIENT:
So client connects to the server. Server accepts the connection and writes the data to be sent to client. Client uses input stream to read this data. Thus, client may not send a message first, but needs only to connect to server.