Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

chat idea  RSS feed

 
mohamed hamdy
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
my graduation project will include chat, i've heared that the idea with it is that each client
starts chatting will be added at a vector of all
chatters ,and that vector will be sent to all of them periodically, but i've another idea that i need to if it's a good one.
my idea is that the vector of chatters will be sent to the new client once he start chatting and never been sent to him again so that all the cahatters who come after him will connect to him because they've recieved the vector that includes him.
 
Joshua Austin
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the only problem you will run into is if someone leaves, then they will still be listed as in the room because the updated list is never sent again.. also if the last person that recieved the list disconnects after connecting and recieving the list then no-one else would be able to connect because the last person to connect would now be gone...
[ February 25, 2003: Message edited by: Joshua Austin ]
 
mohamed hamdy
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i thinl that i can determine first the kind of request at the server by two byte constants one for starting the chat and the other for disconnecting , i intend to use the socket exception that will be thrown at the other side if one left the chat.
you remminded me that i must use a flag at the client so that he refuse the connection for the new incoming clients if he disconnected .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!