Reputation: 335
Hello everyone~
I have a problem to solve~
I have created a server that every one can connect to this server.
The function of The server is in order to transfer message from one client to another client.
I don't known when the other client send the message to the client.
I use Delphi-7 to develop the program.
I didn't find any TCPClient object to listen the message which the TCPServer send.
Please give me your point of views~thanks :)
Upvotes: 1
Views: 2112
Reputation: 163277
Servers don't initiate conversations with clients. If your messaging clients don't already have open connections with the server, and the server needs to notify the client that it has a message, then the client program needs to have a server component so that it can listen for new connections from the message server.
One alternative is for the clients to keep persistent connections open with the server. When a message arrives, the server can send a notification to the appropriate client because it already has a connection open and the client is waiting for a response from the server.
Upvotes: 1