I recently started a game for me and my friend to play while he's away at college. I just tested the connection with him, and the test failed. I'm able to connect to 127.0.0.1, and my own ip with ease, but when I try connecting to my friends, it just doesn't work. I'm not using a router, I'm connected with cable modem, Motorola SurfBoard 5101. Any help will be greatly appreciated. Thank you.

Recommended Answers

All 10 Replies

Is he behind a router? Are either of you behind a firewall?

Ah! I didn't think about him having one, lol. Well, I think he does, I just tested connecting to my other friend, he said he didn't have a router, and I connected, thanks. I forgot about obvious things like that..

;) no problem.

Okay, new weird problem... I can only connect to him, he can't connect to me, any idea what could be up with that? o.O

The guy who's not behind the router/firewall?

A helpful technique that I use when testing socket programs (you are running the same server program that he is right?) is to use telnet. Start, run, type in "cmd" (no quotes) hit enter. Then type in telnet hisIP PORTNumber... so it will look something like telnet google.com 23 . Then, send any data that your client program would send. Telnet will let you know if you made a connection or not, and will let you know if the server responded.....

I was able to connect to him with telnet, he said it showed a connection on his side, command went black though. I couldn't figure out how to send data. He did the telnet while I hosted, and he couldn't connect.

Well, when it goes black you are connected. Some server programs will send information first (on connect, say "Connected.", or some other short way of letting you know), and some will prompt you with a prompt.... like a unix shell, or a login.... yours just stays blank, which is fine, you don't need a prompt. To send the information, just type whatever your app would send, and then hit enter... (I don't remember, you might need to hit enter twice). I dunno why he can't can't to you..... are you running the same server app as he is?

The program is both the server and client.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.