Results 1 to 4 of 4

Thread: Winsock Question

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    39

    Post

    ok, umm, i have a control array. the first index of the control (0) is set to listen.

    I wanted to know, is there any way i can find out the IP of the computer that triggers the ConnectionRequest event?

    i dont think that the remotehostip property will return the IP, because it's not actually set to anything.

    Could really use some help here. Thanks guys.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    The remotehostIP is populated automatically after a connection

    This might help, sorry, I didn't test it...:
    Code:
    Private Sub Winsock1_ConnectionRequest(Index As Integer, _
     ByVal requestID As Long)
        Load Winsock1(Winsock1.Count + 1)
        Winsock1(UBound(Winsock1)).Accept requestID
        MsgBox Winsock1(UBound(Winsock1)).RemoteHostIP
        
    End Sub

  3. #3
    New Member
    Join Date
    Jan 2000
    Posts
    1

    Post

    Dim I as long
    Private Sub Winsock1_ConnectionRequest(Index As Integer, _ ByVal requestID As Long)
    If Index = 0 Then
    I = I + 1
    Load Winsock1(i)
    Winsock1(I).Accept requestID
    MsgBox Winsock1(I).RemoteHostIP
    End If
    End Sub

    Peace out.. from a 14 year old

    ------------------
    -(A)-
    Later

  4. #4
    Guest

    Post

    Private Sub Winsock1_ConnectionRequest(Index As Integer,ByVal requestID As Long
    msgbox Winsock1(0).RemoteHostIP
    .....................................
    End Sub
    GL

    [This message has been edited by Babuger (edited 01-11-2000).]

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