-
Winsock Help
Well I'm not the best Winsock user. I dont know alot about it and I plan to fix that. I'm going to make a test chat program that will connect between 2 comps so we can chat. I basicly dont even really know where to start except to make a connection. Here is what I have for the client:
Winsock.RemoteHost = "127.0.0.1"
Winsock.RemotePort = 15151
Winsock.Connect
That will be run on a command button. The thing is, I dont want to have to have the IP in order to connect. That would mean I could only chat to one person, none if I didn't know anyones IP. I know there is another way of connecting, but I cant exactly remember how it went. Help anyone?
-
Re: Winsock Help
You've either got to have the IPA you are trying to connect to, a valid domain name or a publicly accesible server (at either a known IPA or domain) which will facilitate the connection.
Conversly, you could run as a server and make the other person determine your IPA in order to start a chat session but peer-to-peer communications require that at least one peer know the other's IPA.
-
Re: Winsock Help
Well is there a way to get your program to automaticly determine the others IPA?
-
Re: Winsock Help
I'm reviving this, because im still having trouble. One thing, the domain name is not working. I tested it on my other computer and its not connecting, but I have the right one, I think anyways. I dont really know how to get IPA either. Any ideas?
-
Re: Winsock Help
You can run IPCONFIG to get the current local IP address. I have a program that does it also, but doesn't interface to anything else. It's kind of long, too.
-
Re: Winsock Help
Could you point out where to get it? By the way im testing the IP connection and here is the code I have:
With Winsock
.RemoteHost = "24.23.xxx.124" 'Changed to xxx cuse I dont like giving out my IP
.RemotePort = 1002
.Bind 1001
End With
The Remote host is my IPA, and its the same code for both the Client and Server. It's not working though, and I don't know why. Any Idea? I would like to know how to run that IPCONFIG though dglienna.
-
1 Attachment(s)
Re: Winsock Help
Here is the code that will open the results of IPCONFIG as a text document.
You can use 127.0.0.1 as your local IP address, btw. That way, you don't have to change it when your address changes.