Click here to Skip to main content
15,921,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a client server system using remoting to transmit and receive sound. It is currently working on TCP/IP which is no problem for clients with a good connection. Through research I came to think that a UDP connection might help with this issue.

Am I right in thinking this?

If so how do I go about it. I have tried this but it only connects clients with a static IP and I found that UDP has problems traversing the NAT.

Could anyone show me some sample code of a client server connection please. I have been browsing the net for this for the last 2 weeks.

Please help

1 solution

Yes, UDP would work as long as you set up your clients so that they can tolerate out-of-order and dropped packets.

The trick is to set up a UDP "connection" across NAT. There's lots of information about ways to do that:[^]

Check them out, not sure about sample code, but these links should give you an idea of what's involved. Then you can decide if it's worth doing or not.
Share this answer
milenalukic 14-Jun-11 16:40pm    
I have seen loads of articles and if I understand correctly, I would need to send a message from the client to the server so that the server can read the address and return a message received message. The problem is that I cannot find any information on how to do it. That is why I hope to get some sample code that I can test and then implement in my project.

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