Posted 07 February 2000 - 03:55 AM
My game is currently using only TCP, but I´m going to change it so it will use a combination of both TCP and UDP. I have written a testprogram that will set up a server or a client dependending of your choice. The server binds a socket to a desired port number and listen for a client to connect. The client connects to a desired ip address and port number. Both client and server bind a udp socket to the same number (not the same number as the tcp socket though). The server stores the client´s ip address, which it receives from accept(), which will be used for sendto(). The client sends, depending of user input, udp or tcp messages to the server. When the user types ''0'', the server starts sending to the client instead.
Now to my problem. When I use the test program on my company´s LAN there is no problem at all. The problem occurs when I try to use my program with an outside computer. I run my computer at the office as a client, and the outside computer as a server. The outside server receives both udp and tcp messages. So long no problems. But when the server starts sending messages to the client, only tcp messages are received by the client. Both computer are behind firewalls. My computer at the office (client) is assigned a dynamic ip, the outside computer (server) is having a static ip. The ports we used were free, allowed by the firewall. We first tried to play Quake2, which uses only udp, between the computers with no problems.
Can anyone help me? I''m really stuck.
I hope I have explained my problem in an understandable way.