Please help :(
Could it be because I don't have a port open?
I'm using ports:
12345
12346
12347
12348
12349
12355
12356
Printable View
Please help :(
Could it be because I don't have a port open?
I'm using ports:
12345
12346
12347
12348
12349
12355
12356
Please post the code you are using. Thank you!
Code:Winsock1.RemoteHost = txtIP
Winsock1.RemotePort = txtPort
Winsock2.RemoteHost = txtIP
Winsock2.RemotePort = 12346
Winsock3.RemoteHost = txtIP
Winsock3.RemotePort = 12349
Winsock4.RemoteHost = txtIP
Winsock4.RemotePort = 12348
Winsock5.RemoteHost = txtIP
Winsock5.RemotePort = 12355
Winsock6.RemoteHost = txtIP
Winsock6.RemotePort = 12356
Winsock1.Connect
Winsock2.Connect
Winsock3.Connect
Winsock4.Connect
Winsock5.Connect
Winsock6.Connect
You can find heaps of examples in the vb6 and earlier codebank on how to let winsock communicated between two or more computers.
You can find heaps of examples in the codebank (link below):
http://www.vbforums.com/forumdisplay.php?f=43
What exactly are you trying to do ?
You are attempting to connect to whatever is in txtIP, so if you've entered "localhost" or the IP Address of the Local Machine in txtIP then Winsock will attempt to connect to whatever is Listening on the Local Machine on the Ports you specified.
Sorry, to clarify; by "localhost" I mean 127.0.0.1.
Yes.
So if I enter..... Uh, 24.68.349.120 and there was a listening socket with said ports, it would connect, but it only will connect if it's listening on 127.0.0.1 and attempting to connect on 127.0.0.1. any other IP will not work :(
Yes, that's how TCP/IP works. You can't connect to a TCP/IP connection unless something is listening on that combination of IP Address and TCP Port Number.
As I said before what exactly are you trying to do ?
If, for instance, you're trying to connect to your external IP address from another computer you'll probably have to enable Port Forwarding for the Port(s) in question on your Router. Normally, in most Routers the not 'well known' ports are not forwarded by default.
EDIT: If you're trying to connect to Computer A from Computer B on your local network then Computer A will listen on a Port and Computer B will connect to Computer A's IP address and the same Port number.
Yes that's right.