PDA

Click to See Complete Forum and Search --> : [RESOLVED] Client / Server issue


Dark Anima
Mar 27th, 2009, 05:24 AM
Ello,

I've came across a little problem with my tcp / ip server.
My client can connect to it with 127.0.0.1 ( localhost ), and 192.168.0.X, but every remote connection fails to connect. Any suggestions?

Here's the connection rituals:

Server

listener = New System.Net.Sockets.TcpListener(System.Net.IPAddress.Any, Port)
listener.Start()
listenThread = New System.Threading.Thread(AddressOf doListen)
listenThread.IsBackground = True
listenThread.Start()

Client

client = New System.Net.Sockets.TcpClient(IP, Port)
client.GetStream.BeginRead(readBuffer, 0, BYTES_TO_READ, AddressOf DoRead, Nothing)

If there's any more necessary details that might help solve the problem, please let me know and I'll post them up.

Thanks in advance :)

Hack
Mar 27th, 2009, 05:40 AM
What is the error that you get when you try the remote connection?

Dark Anima
Mar 27th, 2009, 06:00 AM
Connection timeout. No answer from the host between some period of time.
I've tried this with me having the client and server and connecting to my ip but not through localhost (62.78.XXX.XXX), me having the client and my friend having the server and visa verce, shutting down both firewalls completely, yet the problem persists. I'm using vista32 (unfortunately).

Atheist
Mar 27th, 2009, 06:07 AM
Is the computer running the server behind a router?

Dark Anima
Mar 27th, 2009, 06:18 AM
I've never took the effort to learn about routers and their purposes, but I seem to have a router at least since http://192.168.0.1/ redirects to http://192.168.0.1/index.asp with some motorola page asking me for pass / name I really don't have.

So if that's the problem, how to solve it? If solving it includes knowing the router password, is there a way around?

Atheist
Mar 27th, 2009, 06:26 AM
You need to forward the port you're using in the router. And yes it would require you to know the router password. Here (http://www.vbforums.com/showthread.php?p=3382388) is a thread on the same problem, it'll tell you what you need to do.

There is no other solution if you're going to run the server on a computer behind a router.

Pino
Mar 27th, 2009, 07:06 AM
Atheist is correct, however most people dont change there default router passwords. I'd google your router make and see if you can find the default password.

Pino

Dark Anima
Mar 27th, 2009, 08:28 AM
Problem solved by reseting the router, and by doing that reseting the default password as well. Works a treat now, cheers.