Results 1 to 2 of 2

Thread: Winsock Array

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2001
    Location
    Maine
    Posts
    214

    Winsock Array

    I have a winsock array, one winsock is created for each new user. WnskMain with an Index of 0 listens on a port, and then hands off the connection the new winscock control.

    Under DataArrival(), i call a sub, which in turn will send data back to the user. But I don't know how to tell which winsock(port) the user is connected on. I have been told that it is included in the data being sent. Can anyone help me out?

  2. #2
    Lively Member Deucy's Avatar
    Join Date
    Mar 2003
    Location
    Cali
    Posts
    85
    if the Winsock object is an array of Winsock's, then each event will come with a new paramater called Index.. that Index is the index of the corressponding user.. when u call the sub, pass the Index with it, and within the sub, say somethin' like
    VB Code:
    1. Winsock1(Index).SendData "blah"

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