Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ideas needed to push a buddy list

Status
Not open for further replies.

klibby

Programmer
May 30, 2001
51
US
This should be the last question hehe....

im making an instant messenger app... right now, to push a buddy list, check to see who's online who's offline on the user's buddy list.. I have a timer on the client end which will, every 5 seconds, send a command to the server to check the names on the user's buddy list (buddy list is also stored on the server end in an ini), and return the status of each person to the client user... (using winsock for connection)...

What I would like to do, is get rid of that 5 second delay on the buddy list.. with that 5 second timer, somebody would log off.. and they wouldnt be seen offline on another client's buddy list till 5 seconds later....

What I want, is to somehow make it so as soon as somebody logs on, another client sees them on the list....

Any ideas? even if not code.. just an idea would help tons

 
Logon is easy - just send a "Here I Am" message when the app first starts up. Every so often send a "keep alive" message to the server (inefficient, but I've seen major vendors do it).

I don't think you can detect a logoff condition, as they could use the task manager to kill your IM application, and your server would never see anything.

I think you need to code your server to assume that if it hasn't seen an update from a client in 30 seconds or so, to assume it's gone, and remove it from the server's lists.

Chip H.
 
Thats pretty much what im doing....

I have it so when you log on, it sets UserInfo(?).Status = "Online" when they log on...

? = the winsock index they are connected to

and If they disconnect... winsock state will no longer be "7" so it will show offline...

That stuff is no problem..

but... what im trying to figure out.. is how to keep the buddy list on all the client ends running with no delay....

i said, right now, what I have.. is every 5 seconds on the client end, it polls the server and requests status of everybody on the client's buddy list and display who's on who's not from there... What Im asking ideas on... is how to do it without that 5 second delay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top