libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] libmicrohttpd and connection information.


From: Christian Grothoff
Subject: Re: [libmicrohttpd] libmicrohttpd and connection information.
Date: Thu, 5 Feb 2009 20:23:40 -0700
User-agent: KMail/1.10.3 (Linux/2.6.27-9-generic; KDE/4.1.3; i686; ; )

Hi Hedde,

I've fixed this in SVN 8195; however, I'm using the existing generic
"MHD_get_connection_info" API instead of adding a new function as you had
suggested.  

Best,

Christian

On Thursday 05 February 2009 05:23:32 am you wrote:
> Hello Christian,
>
> I recently started a project for myself which needed some networking
> protocol. I decided upon http and found your library. I'm really
> liking it for its ease of use :)
>
> There was one thing i missed in functionality, which was to get
> per-request information on the connection, specifically the
> socket-address (ip actually). I found that the acceptPolicyCallback
> was only called once per IP (at least in version 0.2.0). For my
> application i'd like to know the ip address per request (so you can
> allow/deny a response per ip per request).
>
> To this end i downloaded the latest sourcecode from svn and added the
> below function to the exported functions:
>
> /**
>  * Get the socket address info of the client for this request.
>  *
>  * @param connection the connection from which the sockaddr_in is returned
>  * @return struct sockaddr_in
>  */
> struct sockaddr_in *
> MHD_get_connection_sockaddr(struct MHD_Connection *connection)
> {
>   if (connection == NULL)
>     return NULL;
>   return connection->addr;
> }
>
>
> Is it possible for this feature, or something similar implemented in
> for instance MHD_get_connection_info  to be included in an upcomming
> release?
>
> Regards, Hedde Bosman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]