i m running the server programme on different machines and the ip of server changes according to the machine. how can i detect the ip and port of server programme
Printable View
i m running the server programme on different machines and the ip of server changes according to the machine. how can i detect the ip and port of server programme
u are running on the server program on different machines?
and the IP of the server changes?
Doesnt make much sense to me.
tell us more!!!
Why not create a timer that checks every 1 minute or so? Set the current IP/Port into a variable and check it.
Code:Public strCurrentIP As String
Public strCurrentPort As String
Edit: Oops, I reread your post and noticed that's not what you wanted. I guess you could always just get it that way and send it.Code:Private Sub Timer1_Timer()
If strCurrentIP <> Winsock1.LocalIP Then
strCurrentIP = Winsock1.LocalIP
End If
If strCurrentPort <> Winsock1.LocalPort Then
strCurrentPort = Winsock1.LocalPort
End If
dont understand question lolol...
but ermm
winsock1.localport
winsock1.localIP
winsock1.remoteIP
winsock1.remoteport
also theres a module i had for winsock stuff....was very useful ill look for it if ihave time ...its commented too :)
you cant.
unless you:
upload a textfile to fixed web site from server.
download with client and read ip and port (ENCODE IT THOUGH)
Connect :) :)
just code a notification to icq, email etc, every tmie they log in.