Results 1 to 4 of 4

Thread: IP address from winsock

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2006
    Posts
    61

    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)

  2. #2
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    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.

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2006
    Posts
    61

    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?

  4. #4
    Hyperactive Member
    Join Date
    Aug 2006
    Location
    TeXaS
    Posts
    497

    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
  •  



Click Here to Expand Forum to Full Width