Results 1 to 2 of 2

Thread: Winsock connection

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Garden Grove, CA, USA
    Posts
    110

    Post

    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,

  2. #2
    Guest

    Post

    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: [email protected]
    ICQ: 15440110
    Homepage: http://www.azzmodan.demon.nl




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width