|
-
Sep 3rd, 2006, 12:22 AM
#1
Thread Starter
Member
IP address from winsock
hi all, im trying to capture the client IP address and send it to my server when they are connected. how does one go about getting the Actual IP address and not the local one (192.168.xxx.xxx) i need the real one given by the ISP i beleive. ( its for a messenger program)
-
Sep 3rd, 2006, 12:29 AM
#2
Frenzied Member
Re: IP address from winsock
When the server gets the connection request he will get the client'sm public ip with it.
It's called the remotehost.
-
Sep 3rd, 2006, 12:45 AM
#3
Thread Starter
Member
Re: IP address from winsock
ok so when someone connects to the server, on the serverside, how can i list/store the IP of the connected users? possibly in a database im thinking.. and if so what do i do on the serverside to show the IP of the connected person? could i do something like msgbox remotehostip ( just for example) or possibly, add a listview item with the new IP?
-
Sep 3rd, 2006, 01:14 AM
#4
Hyperactive Member
Re: IP address from winsock
if you want a display on the server so that you can manually change ranks and such for the users the i'd suggest using a listview.
and why are you storing the ip's? they are already located in the winsock object, you just have to look in them to get the data. i think storing it in another array or whatever wouldnt really help you any. all you will use in the serverside is the index's of the winsock control array, unless you plan on banning ip's and such. which you filter that at connection time, or loop thru the ws array.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|