View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002784 | libmicrohttpd | external API | public | 2013-02-08 03:23 | 2013-03-29 20:10 |
| Reporter | klx.login | Assigned To | Christian Grothoff | ||
| Priority | normal | Severity | feature | Reproducibility | have not tried |
| Status | closed | Resolution | no change required | ||
| Platform | i386 | OS | ubuntu | OS Version | 10.04 |
| Summary | 0002784: support for connection's socked fd is desired | ||||
| Description | Use NULL as sock_addr start libmicrohttpd, When there is more than one network card, each time client connect to the httpd, I hope to get which one is connected. In my project, different results will response according to the network card, so expect to get socket fd. Thanks | ||||
| Tags | No tags attached. | ||||
|
|
Isn't MHD_get_connection_info to get the 'struct sockaddr *' of the client socket (from 'accept') sufficient for this? Even if we expose the socket, I don't think the OS will allow you to learn more than this; also, exposing the socket is problematic as sockets are HANDLE on W32 and 'int' on POSIX --- and possibly wrapped by SSL, so I'd rather not support that. If the 'struct sockaddr*' is not sufficient, what system call would you run on the socket if we exposed it? Maybe we can return the specific data you want instead. |
|
|
Thank you for your response. In fact, when multiple NICs, I hope to get the host ip address string of request, but if got from the Daemon struct, it's just "0.0.0.0". |
|
|
You need to use MHD_get_connection_info, which gives you a "union MHD_ConnectionInfo" (not a Daemon struct), and there the "client_addr" should not be 0.0.0.0. Note that it isn't in string format, you'd have to inet_ntop the value first. |
|
|
OK, I know and Thank you |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-02-08 03:23 | klx.login | New Issue | |
| 2013-03-04 13:44 | Christian Grothoff | Note Added: 0006924 | |
| 2013-03-04 13:44 | Christian Grothoff | Assigned To | => Christian Grothoff |
| 2013-03-04 13:44 | Christian Grothoff | Status | new => feedback |
| 2013-03-05 02:24 | klx.login | Note Added: 0006930 | |
| 2013-03-05 02:24 | klx.login | Status | feedback => assigned |
| 2013-03-05 02:46 | klx.login | Note Edited: 0006930 | |
| 2013-03-05 05:52 | Christian Grothoff | Note Added: 0006932 | |
| 2013-03-05 05:52 | Christian Grothoff | Status | assigned => feedback |
| 2013-03-08 02:46 | klx.login | Note Added: 0006951 | |
| 2013-03-08 02:46 | klx.login | Status | feedback => assigned |
| 2013-03-08 06:06 | Christian Grothoff | Status | assigned => resolved |
| 2013-03-08 06:06 | Christian Grothoff | Fixed in Version | => Git master |
| 2013-03-08 06:06 | Christian Grothoff | Resolution | open => no change required |
| 2013-03-08 06:06 | Christian Grothoff | Status | resolved => closed |
| 2013-03-08 06:06 | Christian Grothoff | Target Version | => Git master |
| 2013-03-29 20:10 | Christian Grothoff | Product Version | 0.9.24 => |
| 2013-03-29 20:10 | Christian Grothoff | Fixed in Version | Git master => |
| 2013-03-29 20:10 | Christian Grothoff | Target Version | Git master => |
| 2013-05-06 12:52 | Christian Grothoff | Category | API => libmicrohttpd API |
| 2024-01-21 13:24 | Christian Grothoff | Category | libmicrohttpd API => external API |