
Originally Posted by
AxeFestis
Tanks It work but now i want to send data over the connection please give me an example. I have read some but i dident mange them to work. And when i connect it just says 127.0.0.1 and that aren't my local ip.
There are articles & tutorials all over the net explaining how to use the Winsock control.
To send data you'd put:
Code:
Winsock1.SendData "Data here"
Make sure the Winsock is connected or you will get an "invalid state" error. You could even do a simple check with an If statement:
Code:
If Winsock1.State = sckConnected Then Winsock1.SendData "Data here"
If 127.0.0.1 is showing up as your local IP then that means you either put "127.0.0.1" or "localhost" as the RemoteHost in the Connect statement.
To connect to yourself you can just use:
Code:
Winsock1.Connect Winsock1.LocalIP, 1234