mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
new MHD_CONNECTION_INFO_DAEMON
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
Fri Jun 3 15:26:42 CEST 2011
|
||||
Adding MHD_CONNECTION_INFO_DAEMON to obtain MHD_Daemon
|
||||
responsible for a given connection. -CG
|
||||
|
||||
Wed May 25 14:23:20 CEST 2011
|
||||
Trying to fix stutter problem on timeout described by
|
||||
David Myers on the mailinglist (5/10/2011). -CG
|
||||
|
||||
@@ -733,6 +733,10 @@ Takes no extra arguments. Allows access to the client certificate
|
||||
including access to the underlying GNUtls client certificate
|
||||
(HTTPS connections only). Takes no extra arguments.
|
||||
|
||||
@item MHD_CONNECTION_INFO_DAEMON
|
||||
Returns information about @code{struct MHD_Daemon} which manages
|
||||
this connection.
|
||||
|
||||
@end table
|
||||
@end deftp
|
||||
|
||||
|
||||
@@ -2332,6 +2332,8 @@ MHD_get_connection_info (struct MHD_Connection *connection,
|
||||
#endif
|
||||
case MHD_CONNECTION_INFO_CLIENT_ADDRESS:
|
||||
return (const union MHD_ConnectionInfo *) &connection->addr;
|
||||
case MHD_CONNECTION_INFO_DAEMON:
|
||||
return (const union MHD_ConnectionInfo *) &connection->daemon;
|
||||
default:
|
||||
return NULL;
|
||||
};
|
||||
|
||||
@@ -714,10 +714,10 @@ enum MHD_ConnectionInfoType
|
||||
MHD_CONNECTION_INFO_PROTOCOL,
|
||||
|
||||
/**
|
||||
* Obtain IP address of the client.
|
||||
* Takes no extra arguments. Returns a
|
||||
* 'struct sockaddr_in **' by accident; obsolete,
|
||||
* use MHD_CONNECTION_INFO_CLIENT_SOCK_ADDR.
|
||||
* Obtain IP address of the client. Takes no extra arguments.
|
||||
* Returns essentially a "struct sockaddr **" (since the API returns
|
||||
* a "union MHD_ConnectionInfo *" and that union contains a "struct
|
||||
* sockaddr *").
|
||||
*/
|
||||
MHD_CONNECTION_INFO_CLIENT_ADDRESS,
|
||||
|
||||
@@ -729,7 +729,12 @@ enum MHD_ConnectionInfoType
|
||||
/**
|
||||
* Get the GNUTLS client certificate handle.
|
||||
*/
|
||||
MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT
|
||||
MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT,
|
||||
|
||||
/**
|
||||
* Get the 'struct MHD_Daemon' responsible for managing this connection.
|
||||
*/
|
||||
MHD_CONNECTION_INFO_DAEMON
|
||||
|
||||
};
|
||||
|
||||
@@ -1577,6 +1582,12 @@ union MHD_ConnectionInfo
|
||||
* Address information for the client.
|
||||
*/
|
||||
struct sockaddr *client_addr;
|
||||
|
||||
/**
|
||||
* Which daemon manages this connection (useful in case there are many
|
||||
* daemons running).
|
||||
*/
|
||||
struct MHD_Daemon *daemon;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user