diff options
author | ng0 <ng0@n0.is> | 2019-06-25 14:05:12 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-06-25 14:05:12 +0000 |
commit | ee0942b2e0ea1683d9329f45cc81b193908672ec (patch) | |
tree | f1d8f7b19929c973245edb80f266252c777545b0 /src/microhttpd/mhd_send.c | |
parent | 9af4a482e857fd14b10a1bc52e71d971d9f081a7 (diff) | |
download | libmicrohttpd-ee0942b2e0ea1683d9329f45cc81b193908672ec.tar.gz libmicrohttpd-ee0942b2e0ea1683d9329f45cc81b193908672ec.zip |
iAdd headerfile for mhd_send.
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r-- | src/microhttpd/mhd_send.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index c3724cba..50013c13 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -29,14 +29,7 @@ | |||
29 | // are used. | 29 | // are used. |
30 | // TODO: sendfile() wrappers. | 30 | // TODO: sendfile() wrappers. |
31 | 31 | ||
32 | #include "platform.h" | 32 | #include "mhd_send.h" |
33 | #include "internal.h" | ||
34 | |||
35 | #ifdef HAVE_STDBOOL_H | ||
36 | #include <stdbool.h> | ||
37 | #endif | ||
38 | #include <errno.h> | ||
39 | |||
40 | 33 | ||
41 | // NOTE: TCP_CORK == TCP_NOPUSH in FreeBSD. | 34 | // NOTE: TCP_CORK == TCP_NOPUSH in FreeBSD. |
42 | // TCP_CORK is Linux. | 35 | // TCP_CORK is Linux. |
@@ -47,23 +40,6 @@ | |||
47 | // the linked library needs a different setsockopt usage: | 40 | // the linked library needs a different setsockopt usage: |
48 | // https://stackoverflow.com/questions/48670299/setsockopt-usage-in-linux-and-solaris-invalid-argument-in-solaris | 41 | // https://stackoverflow.com/questions/48670299/setsockopt-usage-in-linux-and-solaris-invalid-argument-in-solaris |
49 | 42 | ||
50 | enum MHD_SendSocketOptions | ||
51 | { | ||
52 | /* definitely no corking (use NODELAY, or explicitly disable cork) */ | ||
53 | MHD_SSO_NO_CORK = 0, | ||
54 | /* should enable corking (use MSG_MORE, or explicitly enable cork) */ | ||
55 | MHD_SSO_MAY_CORK = 1, | ||
56 | /* | ||
57 | * consider tcpi_snd_mss and consider not corking for the header | ||
58 | * part if the size of the header is close to the MSS. | ||
59 | * Only used if we are NOT doing 100 Continue and are still | ||
60 | * sending the header (provided in full as the buffer to | ||
61 | * MHD_send_on_connection_ or as the header to | ||
62 | * MHD_send_on_connection2_). | ||
63 | */ | ||
64 | MHD_SSO_HDR_CORK = 2 | ||
65 | }; | ||
66 | |||
67 | /* | 43 | /* |
68 | * https://svnweb.freebsd.org/base/head/sys/netinet/tcp_usrreq.c?view=markup&pathrev=346360 | 44 | * https://svnweb.freebsd.org/base/head/sys/netinet/tcp_usrreq.c?view=markup&pathrev=346360 |
69 | * Approximately in 2007 work began to make TCP_NOPUSH in FreeBSD | 45 | * Approximately in 2007 work began to make TCP_NOPUSH in FreeBSD |