[MUD-Dev] Re: Quick question re: SSL

Alex Chacha achacha at hotmail.com
Fri Mar 5 17:33:09 New Zealand Daylight Time 2004


Adam M wrote:
> szii at sziisoft.com wrote:
>> From: ceo

>> You can get the IP address from the TCP stack on the client.
>> Then you can register "player X is at IP xxx.yyy.zzz.aaa" on the
>> server.  You could also use the socket information (sockaddr_in
>> structure) to determine that information and register it.

> How, exactly, do you do this with HTTP?

That depends on who's HTTP server implementation you use.  If you
are just doing sockets, then when you receive connection, you also
receive the remote IP address (sockaddr_in).  If you are using a web
server (CGI, plugin, etc) then the server has a context structure it
passes or you can query that contains the remote IP address.  If you
are using Mfc/Win32 then socket class has the methods to access it.
Same thing in Java sockets.  The HTTP protocol rides on top of
TCP/IP and thus you can get the remote IP address.
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list