Click here to Skip to main content
15,880,956 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,
It's my first encounter with client server. I'm tried to download a client server code from the internet, but I don't really found a good code like I want.

I want that the application will do something like that:
The server will save the all client that connected.
One of the client will send massage and reciverId to the server, and the server will send the massege to Client who has ID = reciverID.
The connection between client to server will be disconnected when the client will send "EXIT" massage.

Can anyone help me to find or implement such code?
Posted
Comments
Maciej Los 20-Aug-15 5:04am    
What you mean by "server"?

You could start with this simple example Introduction to TCP client server in C#[^].
 
Share this answer
 
Comments
Maciej Los 20-Aug-15 5:06am    
5ed!
Member 11186420 20-Aug-15 5:14am    
I tried it allredy. I'm looking for more complex code.
Maciej Los 20-Aug-15 5:17am    
So, you have to provide more details about your needs.
Member 11186420 20-Aug-15 7:40am    
Thanks a lot for your kind help.

I am looking for client-server source code with a server that supports about 20 different clients, the server should be able to listen for all of them and send messages to each other according to ReciverID\SenderID. The client should be written in c#.
Maciej Los 20-Aug-15 8:46am    
Dear Member 11186420, don't be mad on me, but i have to state that we can't read in your mind or direct from your screen...
Websockets could be another way to solve this problem - Web Socket Server[^].
 
Share this answer
 
Comments
Member 11186420 20-Aug-15 7:44am    
Thanks a lot. I am looking for a similar example but the client should be in c# and not in web. Do you have any idea how can I find such example?
Maciej Los 20-Aug-15 8:50am    
+5!
Abhinav S 20-Aug-15 12:59pm    
Thanks Maciej.
Please, read my replies to your comments.

I'd suggest to browse CP Knowledge Base[^]. There you'll find tons of samples. I hope that - at least - one example will meet your needs.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900