From 263c2efd960057f1cfafd40fce338605c39b0ad4 Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Wed, 22 May 2013 12:48:58 -0700 Subject: Added option for using TCP_DEFER_ACCEPT. Prevents the connection from being handed over to the daemon before data is ready from the client. --- make/test/so_acceptfilter.cpp | 27 +++++++++++++++++++++++++++ make/test/tcp_defer_accept.cpp | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 make/test/so_acceptfilter.cpp create mode 100644 make/test/tcp_defer_accept.cpp (limited to 'make') 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 . + */ + +#include + +#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 . + */ + +#include + +#ifndef TCP_DEFER_ACCEPT + #error +#endif + +int main() +{ + return 0; +} -- cgit v1.2.3