PDA

Click to See Complete Forum and Search --> : Winsock connection


thinh
Sep 26th, 1999, 11:27 AM
Hello there,
Can anybody show me the code to connect to a remotehost using Winsock in VB5?
i read the help menu butstill don't understand what it needs....

i'm stuck right here: Form.winsock1.connect
i don't know how to get it to connect to a remote server...
all help are preciated,

Sep 26th, 1999, 09:44 PM
winsock1.connect <ip>,<port>
(Open connection to microsoft.com on port 80)
winsock1.connect "www.microsoft.com",80

(wait until we are connected, or use the winsock1_connected event)
do until winsock1.state = sckConnected
doevents
loop


Then you could senddata using winsock1.senddata <text>

Or receive data in the
winsock1_datarrival event



------------------

Vincent van den Braken
EMail: azzmodan@azzmodan.demon.nl
ICQ: 15440110 (http://www.icq.com/15440110)
Homepage: http://www.azzmodan.demon.nl