View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006019 | libmicrohttpd | external API | public | 2019-12-28 18:39 | 2020-02-13 20:11 |
Reporter | fche | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.9.69 | ||||
Target Version | 0.9.71 | Fixed in Version | 0.9.70 | ||
Summary | 0006019: request api to check whether mhd connection object still live (tcp socket still connected) | ||||
Description | For a multithreaded server where the mhd handlers may block & do longwinded work, it could be beneficial to be able to poll or be told that the underlying tcp connection has been broken by a client going away. That way it can abort this work in progress. The closest thing I could find so far is to get the connection fd via MHD_get_connection_info(MHD_CONNECTION_INFO_CONNECTION_FD), switch the fd into nonblocking mode, then do a trial recv(MSG_PEEK) against it, then restore previous state. If this logic is plausible, it may be useful enough to put it into the api proper. | ||||
Tags | No tags attached. | ||||
|
Eh, why would you switch the FD to non-blocking? All sockets that MHD uses should always already be non-blocking. Other than that, the reason why we have a way for you to get to the socket is to allow you to do such things, so the API already exists. Not sure what we should change here... |
|
"All sockets that MHD uses should always already be non-blocking." OK, if this is a guarantee, that's great. Is that in the documentation somewhere? |
|
I've added a comment to that effect in fe6716d1..902e3774. Resolving this issue. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-12-28 18:39 | fche | New Issue | |
2020-02-07 14:18 | Christian Grothoff | Note Added: 0015311 | |
2020-02-07 14:18 | Christian Grothoff | Assigned To | => Christian Grothoff |
2020-02-07 14:18 | Christian Grothoff | Status | new => feedback |
2020-02-07 14:21 | fche | Note Added: 0015312 | |
2020-02-07 14:21 | fche | Status | feedback => assigned |
2020-02-07 14:23 | Christian Grothoff | Assigned To | Christian Grothoff => |
2020-02-07 14:23 | Christian Grothoff | Status | assigned => feedback |
2020-02-09 23:45 | Christian Grothoff | Note Added: 0015325 | |
2020-02-09 23:45 | Christian Grothoff | Assigned To | => Christian Grothoff |
2020-02-09 23:45 | Christian Grothoff | Status | feedback => resolved |
2020-02-09 23:45 | Christian Grothoff | Resolution | open => fixed |
2020-02-09 23:45 | Christian Grothoff | Fixed in Version | => 0.9.71 |
2020-02-09 23:45 | Christian Grothoff | Target Version | => 0.9.71 |
2020-02-13 20:11 | Christian Grothoff | Status | resolved => closed |
2020-02-13 20:11 | Christian Grothoff | Fixed in Version | 0.9.71 => 0.9.70 |
2024-01-21 13:24 | Christian Grothoff | Category | libmicrohttpd API => external API |