Our game uses both TCP and UDP for communication (TCP for user actions, UDP for movement). We did this on the same port, but then realized that when we upload a server to PlayFab and choose Process mode, we can't have TCP and UDP on one port - so we split them up into port_tcp and port_udp.
The problem arises when we connect to the server, we receive both ports and connect to them, and user actions work, but movement does not (UDP port). When I change the ports and IP to be localhost to test, everything works fine.
Server starts listening:
tcpListener = new TcpListener(ipAddress, TCPPort); tcpListener.Start(); tcpListener.BeginAcceptTcpClient(new AsyncCallback(TCPConnectCallback), null); udpListener = new UdpClient(UDPPort); udpListener.BeginReceive(UDPReceiveCallback, null);
Clients then connect to both UDP and TCP - everything is fine but movement does not work (UDP), whereas user actions do (TCP).
What could be the problem?