question about TCP/IP

Hi, I have a question about TCP/IP connection using winsocket.
I wrote a simple client and server codes using winsocket and they work perfectly ok on the same computer. That is, I execute my server and then I execute my client on the same machine. And, they can exchange information and what not.
But, when I run my server on one machine and my client on another machine, they don't work. I have enabled the specific port I have used in both my codes in my internet connection. So, that can't be the problem. Do you have any suggestion?
I won't bother to write my codes here, because I don't think there's a problem with them.
You're trying to connect to the other computer and not to your own, right?
yes. I have 2 computers next to each other. I'm trying to have my server run in one computer and client run in the other computer.
Make sure you ports are fowarded in your router settings. I had the same problem when i first started using winsock
Well. Here's what I did. I change my IP address to static and then accessed my router through 192.168.1.1 and then forwarded ports on my IP address. And it still won't work!!
Guess You got to show us code;)... (nobody will steal from it or laugh about it, so dont be scared^^)...
closed account (S6k9GNh0)
Your machine has a unique address on the network which you must access. Your router itself actually has an address as well and this is not the address you want. For internal-network operations, you shouldn't need to forward ports (on your router, a soft firewall may be different). If your trying to connect to the computer on your network through the internet itself and not your home network, you will indeed need to forward ports.

I would also get something like Wireshark to monitor packets that are being received and sent to make sure its not the server that's not reacting correctly (or if your not receiving packets at all).
Hi nara i am a planning to write a code similar to this(Client/Server) and i think it would be grt if you could help me out. plz chk out my post, for further details send me message
Topic archived. No new replies allowed.