I'm trying to setup a Udp connection after a Tcp connection has been made. All of the connection states and control goes through Tcp, but I want the client and server to be able to talk through Udp as well. This is my problem.
The server will have many clients connected to it on separate threads. I have it %100 working fine with just Tcp binded, but I want to use Udp. Because of Udp Hole Punching I'm having a hard time listening for a specific endpoint on Udp because the endpoint can change when communicating with a NAT device.
So, to put the question simply: How do I easily get a "UdpClient" connection going from a TcpClient connection to reference?
Thank you in advance!
There will be no tunnel for UDP, just because you have a successful TCP connection. You have to establish the UDP connection the same way you got the TCP connection. E.g. if the TCP connection was established from intern to outside you have to do the same with UDP, otherwise the NAT device will not establish a connection for the UDP connection and thus packets from the peer will not be sent to you.