diff options
author | Daniel Vassdal <shutter@canternet.org> | 2013-05-22 12:48:58 -0700 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-06-03 18:45:46 +0200 |
commit | 263c2efd960057f1cfafd40fce338605c39b0ad4 (patch) | |
tree | bd953e551f1f184b3725da2cf9656a4bb302983b /make | |
parent | ca4c4a67988419b9eb479ffcf82238dc1648b0ad (diff) |
Added option for using TCP_DEFER_ACCEPT. Prevents the connection from being handed over to the daemon before data is ready from the client.
Diffstat (limited to 'make')
-rw-r--r-- | make/test/so_acceptfilter.cpp | 27 | ||||
-rw-r--r-- | make/test/tcp_defer_accept.cpp | 27 |
2 files changed, 54 insertions, 0 deletions
diff --git a/make/test/so_acceptfilter.cpp b/make/test/so_acceptfilter.cpp new file mode 100644 index 000000000..0fd4cda4f --- /dev/null +++ b/make/test/so_acceptfilter.cpp @@ -0,0 +1,27 @@ +/* + * InspIRCd -- Internet Relay Chat Daemon + * + * + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <sys/socket.h> + +#ifndef SO_ACCEPTFILTER + #error +#endif + +int main() +{ + return 0; +} diff --git a/make/test/tcp_defer_accept.cpp b/make/test/tcp_defer_accept.cpp new file mode 100644 index 000000000..191b1ac70 --- /dev/null +++ b/make/test/tcp_defer_accept.cpp @@ -0,0 +1,27 @@ +/* + * InspIRCd -- Internet Relay Chat Daemon + * + * + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <netinet/tcp.h> + +#ifndef TCP_DEFER_ACCEPT + #error +#endif + +int main() +{ + return 0; +} |