Re: HTTP server storing client's IP address?

"racqueldesign" <[email protected]>
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
Hi Jesus,

Thanks for telling about the getpeername but I first need to know the name of the socket.  For example:

void main()
{
	sock_init_or_exit(1);	
	http_init();
	tcp_reserveport(80);
	while (1)
	{
		http_handler();	
	}
}

I am guessing the http_init() setup the socket.  Am i right or am I missing something?  I need my .cgi handler to get its client's ip address.  Is there also a function the returns a pointer to the current socket?  I think that might solve my problem with your advice.



--- In [email protected], "Jesus Manuel Conejo Sarabia" <jmconejo@...> wrote:
>
>  
> 
> Hi racquel,
> 
>                 Yes!, using getpeername function from Dynamic C.
> 
>  
> 
> Regards
> 
> Jesus
> 
>  
> 
>  
> 
>  
> 
>  
> 
> De: [email protected] [mailto:[email protected]] En
> nombre de racqueldesign
> Enviado el: viernes, 02 de noviembre de 2012 13:45
> Para: [email protected]
> Asunto: [rabbit-semi] HTTP server storing client's IP address?
> 
>  
> 
>   
> 
> I have a HTTP Server running on the rabbit board but I don't know how to
> store the IP Address of any user that send an HTTP REQUEST. My question is:
> is there a easy way for a server to acquire the IP address of its client?
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.