Michal Olek

Greenhorn
+ Follow
since May 28, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michal Olek

Does anyone knows how the following problem is solved in application like YahooMessneger etc:
When client starts it connects to server via TCPIP and maintains permanent connection to it. THe server starts new thread and this new thread receives incoming messages, process them and sends back result. So far, so simply. But !
How, then, server communicates to client an "independent" event (ie: "User John is now online") THere is no new connection made to client from server. THis is for sure. The message goes via the connection that client initiates. On the server side it is not a problem - server just "push" the message to output stream. But the client expects message only when it has sent previosuly something to server (!) One may add a thread to a client that is only waiting for messages from server, but then how client may tell whether something that is coming from the server is the answer to request or a notification of an independent event?