-
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. :)
-
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
-
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
-
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).]