Client And Server Chat
-
Hello, I've built a chat that few clients can connect to the server and every message that each client send all the other recieve it. I want to add all the user name to each client when a new client is connect. How can i do it? i'm using the Hashtable class to store the users. thanks...
-
Hello, I've built a chat that few clients can connect to the server and every message that each client send all the other recieve it. I want to add all the user name to each client when a new client is connect. How can i do it? i'm using the Hashtable class to store the users. thanks...
if you've done all that then it should not be hard to do what you want. the logic is the same. where exactly are you stuck?
regards :)
-
if you've done all that then it should not be hard to do what you want. the logic is the same. where exactly are you stuck?
regards :)
-
How to remove from the other clients the users (from the list box). The massege i sent with StreamWriter (run on all the tcpClient array) to all the connetced clients. But somehow i have problem doing it... :(
from what i understand, every message a client sends goes to the server which then broadcasts to all the clients. is that correct? if so, then the server will receive all the notifications regarding users logging in and logging out. it is just a matter of sending a control message to all the clients and notifying them of the changes that occurred. for that you need to design your own protocol and decide how you would like to handle server-client communication. if you have reached as far as broadcasting the messages to all clients, i presume that you have implemented some sort of protocol for the communication. now, all you have to do is extend it to include some server messages or commands that are handled by the client.
regards :)
-
from what i understand, every message a client sends goes to the server which then broadcasts to all the clients. is that correct? if so, then the server will receive all the notifications regarding users logging in and logging out. it is just a matter of sending a control message to all the clients and notifying them of the changes that occurred. for that you need to design your own protocol and decide how you would like to handle server-client communication. if you have reached as far as broadcasting the messages to all clients, i presume that you have implemented some sort of protocol for the communication. now, all you have to do is extend it to include some server messages or commands that are handled by the client.
regards :)