• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Design question about voice chat program.

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My questions involve singing in, and making sure a client is still logged on.

First, how should clients log onto the server? TCP or UDP?

TCP is connection oriented, so once I sign-in, the connection is always there, I can always check the status of the connection to know the status of the user.
Drawback is, it's costly maintaining a connection, specially as I get more users online.

UDP will require me to send ONE given packet to sign-in (assuming it arrives), but then, how do I update the server on my status status? Does the client send a message to the server every now and then to stay alive?

What if two users are chatting and one logs out? Should the client who logged out send a UDP packet to the server so that the server knows it logged out? Who should message the other client that was being chatted with?
 
Liar, liar, pants on fire! refreshing plug:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic