GetClientIP() returns 0.0.0.0
GetClientIP() returns 0.0.0.0
IPString(GetClientIP(ClientID)) returns 0.0.0.0 when a client disconnects from a server. The ClientID is ok. Is the IP address deleted for that ClientID when the client disconnects? If i need to know the IP of a client that just disconnected, must i store it somewhere when it connected?
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: GetClientIP() returns 0.0.0.0
Well, I am not an expert by any means but if the Client is disconnected, how can the Server get the Client's IP Address? it's 'not there' is it?
If i need to know the IP of a client that just disconnected, must i store it somewhere when it connected?
Sounds logical.
If i need to know the IP of a client that just disconnected, must i store it somewhere when it connected?
Sounds logical.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: GetClientIP() returns 0.0.0.0
Don't you find it strange that the ClientID is returned but not the IP? Since the IP is obtained from the ClientID, i just find it odd but thanks for the reply, i'll store it on connection.
Re: GetClientIP() returns 0.0.0.0
Can you have multiple connections per IP? If yes, it makes much more sense to return the clientID and not the IP.AndyMK wrote:Don't you find it strange that the ClientID is returned but not the IP? Since the IP is obtained from the ClientID, i just find it odd but thanks for the reply, i'll store it on connection.
Disclaimer: I haven't used PB's networking library at all, so I really don't know.
Re: GetClientIP() returns 0.0.0.0
You would be better off using the clientid as an identifyer for the client than the ip because it will always be shown whenever an event occurs by that client.