Click here to Skip to main content
15,921,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have created tcpclient and tcpserver evrything works fine. I can send messages to each other. But what if there is another client connected to same tcpserver. Do i send him message directly from client by setting ipendpoint as his ip ? or i need to send message to tcpserver and then from server send it to another client.

I keep looking answer in internet but i can't find solution. how to send private message to other client. please help.
thank you
Posted

1 solution

You can do either. What you do is up to your requirements.

But, keep in mind that any workstation version of Windows will only allow 10 inbound connections max. So, if you opt for having client to client connections, each client will be limited to a maximum of 10 other clients talking directly to it.

A better way would be to route all traffic through a central server that maintains a conversion session so you don't run into the 10 connection limit. Server editions of Winodws don't have this restriction.
 
Share this answer
 
Comments
eljecto 14-Sep-11 12:24pm    
so what should code line look like when you send diretctly or fromserver.
could you give me an example of code line. thank you

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