ENDIF
ENDIF
+IF[{- !$disabled{"quic"} -}]
+ SUBDIRS=quic
+ENDIF
+
IF[{- !$disabled{"cms"} -}]
IF[{- !$disabled{"deprecated"} -}]
SUBDIRS=cms
--- /dev/null
+SUBDIRS=server
# To run the demo when linked with a shared library (default) ensure that
# libcrypto and libssl are on the library path. For example:
#
-# LD_LIBRARY_PATH=../.. ./server 4444 \
-# ../../test/certs/servercert.pem \
-# ../../test/certs/serverkey.pem
-#
-# TODO(QUIC SERVER): Add build.info.
+# LD_LIBRARY_PATH=../../.. ./server 4444 \
+# ../../../test/certs/servercert.pem \
+# ../../../test/certs/serverkey.pem
#
CFLAGS += -I../../../include -g -Wall -Wsign-compare
LDFLAGS += -L../../..
--- /dev/null
+#
+# To run the demo when linked with a shared library (default) ensure that
+# libcrypto and libssl are on the library path. For example:
+#
+# LD_LIBRARY_PATH=../../.. ./server 4444 \
+# ../../../test/certs/servercert.pem \
+# ../../../test/certs/serverkey.pem
+
+
+PROGRAMS{noinst} = server
+
+INCLUDE[server]=../../../include
+SOURCE[server]=server.c
+DEPEND[server]=../../../libcrypto ../../../libssl
#include <openssl/err.h>
#include <openssl/ssl.h>
#include <openssl/quic.h>
-#include <netinet/in.h>
-#include <unistd.h>
+#ifdef _WIN32 /* Windows */
+# include <winsock2.h>
+#else /* Linux/Unix */
+# include <netinet/in.h>
+# include <unistd.h>
+#endif
#include <assert.h>
/*
* so the below call is not actually necessary. The configured behaviour is
* inherited by child objects.
*/
- SSL_set_blocking_mode(listener, 1);
+ if (!SSL_set_blocking_mode(listener, 1))
+ goto err;
for (;;) {
/* Blocking wait for an incoming connection, similar to accept(2). */