diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-08-20 16:31:53 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-08-20 16:31:53 +0300 |
commit | e501c74ddceab86e48c031ca9b5e154f52dcdae0 (patch) | |
tree | 7bfe94354df516d1ceefc5af3194ba943e443aa2 /auto | |
parent | 9bbf54e23e185e94054072fff2673f6f5cd203e9 (diff) | |
download | unit-e501c74ddceab86e48c031ca9b5e154f52dcdae0.tar.gz unit-e501c74ddceab86e48c031ca9b5e154f52dcdae0.tar.bz2 |
Introducing websocket support in router and libunit.
Diffstat (limited to '')
-rw-r--r-- | auto/make | 24 | ||||
-rw-r--r-- | auto/modules/go | 1 | ||||
-rw-r--r-- | auto/sources | 5 |
3 files changed, 28 insertions, 2 deletions
@@ -57,6 +57,7 @@ $echo >> $NXT_MAKEFILE $echo "NXT_LIB_UNIT_OBJS = \\" >> $NXT_MAKEFILE $echo " $NXT_BUILD_DIR/src/nxt_lvlhsh.o \\" >> $NXT_MAKEFILE $echo " $NXT_BUILD_DIR/src/nxt_murmur_hash.o \\" >> $NXT_MAKEFILE +$echo " $NXT_BUILD_DIR/src/nxt_websocket.o \\" >> $NXT_MAKEFILE for nxt_src in $NXT_LIB_UNIT_SRCS do @@ -108,7 +109,9 @@ END # Object files. for nxt_src in $NXT_LIB_SRCS $NXT_TEST_SRCS $NXT_LIB_UNIT_SRCS \ - src/test/nxt_unit_app_test.c + src/test/nxt_unit_app_test.c \ + src/test/nxt_unit_websocket_chat.c \ + src/test/nxt_unit_websocket_echo.c do nxt_obj=${nxt_src%.c}.o nxt_dep=${nxt_src%.c}.dep @@ -150,7 +153,8 @@ if [ $NXT_TESTS = YES ]; then .PHONY: tests tests: $NXT_BUILD_DIR/tests $NXT_BUILD_DIR/utf8_file_name_test \\ - $NXT_BUILD_DIR/unit_app_test + $NXT_BUILD_DIR/unit_app_test $NXT_BUILD_DIR/unit_websocket_chat \\ + $NXT_BUILD_DIR/unit_websocket_echo $NXT_BUILD_DIR/tests: \$(NXT_TEST_OBJS) \\ $NXT_BUILD_DIR/$NXT_LIB_STATIC @@ -174,6 +178,22 @@ $NXT_BUILD_DIR/unit_app_test: $NXT_BUILD_DIR/src/test/nxt_unit_app_test.o \\ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \\ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS +$NXT_BUILD_DIR/unit_websocket_chat: \\ + $NXT_BUILD_DIR/src/test/nxt_unit_websocket_chat.o \\ + $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC + \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_websocket_chat \\ + \$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_unit_websocket_chat.o \\ + $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \\ + $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS + +$NXT_BUILD_DIR/unit_websocket_echo: \\ + $NXT_BUILD_DIR/src/test/nxt_unit_websocket_echo.o \\ + $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC + \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_websocket_echo \\ + \$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_unit_websocket_echo.o \\ + $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \\ + $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS + END else diff --git a/auto/modules/go b/auto/modules/go index 62c3743f..51b5979d 100644 --- a/auto/modules/go +++ b/auto/modules/go @@ -107,6 +107,7 @@ ${NXT_GO}-install-src: ${NXT_VERSION_H} install -d \$(DESTDIR)\$(NXT_GO_DST)/src/nginx/unit install -p -m644 ./src/*.h ./build/*.h ./src/go/unit/* \ ./src/nxt_unit.c ./src/nxt_lvlhsh.c ./src/nxt_murmur_hash.c \ + ./src/nxt_websocket.c \ \$(DESTDIR)\$(NXT_GO_DST)/src/nginx/unit/ ${NXT_GO}-install-build: ${NXT_GO}-install-src diff --git a/auto/sources b/auto/sources index 4c4fd742..8ac8fb19 100644 --- a/auto/sources +++ b/auto/sources @@ -86,6 +86,11 @@ NXT_LIB_SRCS=" \ src/nxt_application.c \ src/nxt_external.c \ src/nxt_port_hash.c \ + src/nxt_sha1.c \ + src/nxt_websocket.c \ + src/nxt_websocket_accept.c \ + src/nxt_http_websocket.c \ + src/nxt_h1proto_websocket.c \ " NXT_LIB_SRC0=" \ |