Chat client and private chat
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   shinling_tan
Posted On:   Wednesday, February 11, 2004 01:13 AM

i'm trying to add in a private chat function for my chat program. but it dun seem to work well..i wonder whether is there a problem with my concept.

when client1 send a private message to client 2:
private chat frame pass the message to client1
client1 pass it to server
server will pass the message to client 2
then client2 will pass to its private chat frame

The problem appear when one client have more than one private chat, only the latest private chat frame created can work.

Re: Chat client and private chat

Posted By:   Mike_John  
Posted On:   Thursday, February 12, 2004 08:27 PM

There are multiple ways to attack this problem. But the basic issue seems to be, u have not coupled the private chat window and the user. Whenever a new private chat window is created, link it to the corresponding user. And on the client side u should have and engine to sort out the users... to despatch the message to the correct provate chat window.

Re: Chat client and private chat

Posted By:   rick_murphy  
Posted On:   Wednesday, February 11, 2004 10:41 PM

I think it shoud be a server-side process.

1: you should bind a target address to every message before sending.

2: when server recieve the message,it should analyse the message to get the text and target client's address, then,
send the text to the correct target.


message should be treat as an object ,it composed with text and target client's address.

About | Sitemap | Contact