/libuv/test/ |
H A D | test-tcp-bind-error.c | 115 uv_tcp_t server; in TEST_IMPL() local 127 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL() 140 uv_tcp_t server; in TEST_IMPL() local 150 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL() 165 uv_tcp_t server; in TEST_IMPL() local 190 uv_tcp_t server; in TEST_IMPL() local 216 uv_tcp_t server; in TEST_IMPL() local 233 uv_tcp_t server; in TEST_IMPL() local 250 uv_tcp_t server; in TEST_IMPL() local 264 uv_tcp_t server; in TEST_IMPL() local [all …]
|
H A D | test-pipe-bind-error.c | 77 uv_pipe_t server; in TEST_IMPL() local 83 r = uv_pipe_bind(&server, BAD_PIPENAME); in TEST_IMPL() 86 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL() 98 uv_pipe_t server; in TEST_IMPL() local 103 r = uv_pipe_bind(&server, TEST_PIPENAME); in TEST_IMPL() 105 r = uv_pipe_bind(&server, TEST_PIPENAME_2); in TEST_IMPL() 108 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL() 123 uv_pipe_t server; in TEST_IMPL() local 132 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL() 143 uv_pipe_t server; in TEST_IMPL() local [all …]
|
H A D | test-tcp-bind6-error.c | 76 uv_tcp_t server; in TEST_IMPL() local 84 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL() 89 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL() 104 uv_tcp_t server; in TEST_IMPL() local 112 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL() 117 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL() 132 uv_tcp_t server; in TEST_IMPL() local 141 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL() 148 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL() 161 uv_tcp_t server; in TEST_IMPL() local [all …]
|
H A D | test-tcp-connect6-error.c | 49 uv_tcp_t server; in TEST_IMPL() local 58 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL() 61 &server, in TEST_IMPL() 66 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL() 83 uv_tcp_t server; in TEST_IMPL() local 111 ASSERT_OK(uv_tcp_init(uv_default_loop(), &server)); in TEST_IMPL() 120 &server, in TEST_IMPL() 124 uv_close((uv_handle_t*) &server, NULL); in TEST_IMPL()
|
H A D | test-udp-multicast-interface.c | 30 ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) 32 static uv_udp_t server; variable 70 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL() 74 r = uv_udp_bind(&server, (const struct sockaddr*)&baddr, 0); in TEST_IMPL() 77 r = uv_udp_set_multicast_interface(&server, "0.0.0.0"); in TEST_IMPL() 83 &server, in TEST_IMPL() 100 ASSERT_OK(server.send_queue_size); in TEST_IMPL()
|
H A D | test-udp-multicast-interface6.c | 30 ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) 32 static uv_udp_t server; variable 73 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL() 77 r = uv_udp_bind(&server, (const struct sockaddr*)&baddr, 0); in TEST_IMPL() 81 r = uv_udp_set_multicast_interface(&server, "::1%lo0"); in TEST_IMPL() 83 r = uv_udp_set_multicast_interface(&server, NULL); in TEST_IMPL() 90 &server, in TEST_IMPL()
|
H A D | test-delayed-accept.c | 49 uv_tcp_t* server; in do_accept() local 59 server = (uv_tcp_t*)timer_handle->data; in do_accept() 60 r = uv_accept((uv_stream_t*)server, (uv_stream_t*)accepted_handle); in do_accept() 70 uv_close((uv_handle_t*)server, close_cb); in do_accept() 102 uv_tcp_t* server = (uv_tcp_t*)malloc(sizeof *server); in start_server() local 106 ASSERT_NOT_NULL(server); in start_server() 108 r = uv_tcp_init(uv_default_loop(), server); in start_server() 110 r = uv_tcp_bind(server, (const struct sockaddr*) &addr, 0); in start_server() 113 r = uv_listen((uv_stream_t*)server, 128, connection_cb); in start_server()
|
H A D | test-udp-multicast-join.c | 30 ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) 34 static uv_udp_t server; variable 117 uv_close((uv_handle_t*) &server, close_cb); in cl_recv_cb() 125 r = uv_udp_set_membership(&server, MULTICAST_ADDR, NULL, UV_LEAVE_GROUP); in cl_recv_cb() 129 r = uv_udp_set_source_membership(&server, MULTICAST_ADDR, NULL, source_addr, UV_JOIN_GROUP); in cl_recv_cb() 132 uv_close((uv_handle_t*) &server, close_cb); in cl_recv_cb() 155 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL() 162 r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL() 166 r = uv_udp_set_membership(&server, MULTICAST_ADDR, NULL, UV_JOIN_GROUP); in TEST_IMPL() 177 r = uv_udp_recv_start(&server, alloc_cb, cl_recv_cb); in TEST_IMPL()
|
H A D | test-tcp-read-stop-start.c | 25 static uv_tcp_t server; variable 83 uv_close((uv_handle_t*)&server, NULL); in on_read2() 88 static void on_connection(uv_stream_t* server, int status) { in on_connection() argument 91 ASSERT_OK(uv_tcp_init(server->loop, &connection)); in on_connection() 93 ASSERT_OK(uv_accept(server, (uv_stream_t* )&connection)); in on_connection() 112 ASSERT_OK(uv_tcp_init(loop, &server)); in TEST_IMPL() 114 ASSERT_OK(uv_tcp_bind(&server, (struct sockaddr*) & addr, 0)); in TEST_IMPL() 116 ASSERT_OK(uv_listen((uv_stream_t*)&server, 10, on_connection)); in TEST_IMPL()
|
H A D | test-udp-multicast-ttl.c | 30 ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) 32 static uv_udp_t server; variable 62 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL() 66 r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL() 69 r = uv_udp_set_multicast_ttl(&server, 32); in TEST_IMPL() 76 &server, in TEST_IMPL()
|
H A D | test-multiple-listen.c | 30 static uv_tcp_t server; variable 42 uv_close((uv_handle_t*)&server, close_cb); in connection_cb() 53 r = uv_tcp_init(uv_default_loop(), &server); in start_server() 56 r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); in start_server() 59 r = uv_listen((uv_stream_t*)&server, 128, connection_cb); in start_server() 62 r = uv_listen((uv_stream_t*)&server, 128, connection_cb); in start_server()
|
H A D | test-tcp-create-socket-early.c | 40 static void on_connection(uv_stream_t* server, int status) { in on_connection() argument 49 r = uv_tcp_init_ex(server->loop, handle, AF_INET); in on_connection() 52 r = uv_accept(server, (uv_stream_t*)handle); in on_connection() 55 uv_close((uv_handle_t*) server, NULL); in on_connection() 60 static void tcp_listener(uv_loop_t* loop, uv_tcp_t* server) { in tcp_listener() argument 66 r = uv_tcp_init(loop, server); in tcp_listener() 69 r = uv_tcp_bind(server, (const struct sockaddr*) &addr, 0); in tcp_listener() 72 r = uv_listen((uv_stream_t*) server, 128, on_connection); in tcp_listener() 203 uv_tcp_t client, server; in TEST_IMPL() local 206 tcp_listener(uv_default_loop(), &server); in TEST_IMPL()
|
H A D | test-udp-multicast-join6.c | 31 ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) 45 static uv_udp_t server; variable 129 uv_close((uv_handle_t*) &server, close_cb); in cl_recv_cb() 137 r = uv_udp_set_membership(&server, MULTICAST_ADDR, INTERFACE_ADDR, UV_LEAVE_GROUP); in cl_recv_cb() 140 …r = uv_udp_set_source_membership(&server, MULTICAST_ADDR, INTERFACE_ADDR, source_addr, UV_JOIN_GRO… in cl_recv_cb() 177 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL() 184 r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL() 187 r = uv_udp_set_membership(&server, MULTICAST_ADDR, INTERFACE_ADDR, UV_JOIN_GROUP); in TEST_IMPL() 204 r = uv_udp_recv_start(&server, alloc_cb, cl_recv_cb); in TEST_IMPL()
|
H A D | test-udp-try-send.c | 30 ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) 32 static uv_udp_t server; variable 89 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL() 92 r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL() 95 r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); in TEST_IMPL() 117 ASSERT_OK(server.send_queue_size); in TEST_IMPL()
|
H A D | test-udp-send-immediate.c | 30 ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) 32 static uv_udp_t server; variable 91 uv_close((uv_handle_t*) &server, close_cb); in sv_recv_cb() 105 r = uv_udp_init(uv_default_loop(), &server); in TEST_IMPL() 108 r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); in TEST_IMPL() 111 r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); in TEST_IMPL()
|
H A D | test-tcp-connect-error.c | 50 uv_tcp_t server; in TEST_IMPL() local 56 r = uv_tcp_init(uv_default_loop(), &server); in TEST_IMPL() 59 &server, in TEST_IMPL() 64 uv_close((uv_handle_t*)&server, close_cb); in TEST_IMPL()
|
H A D | test-ipc.c | 72 ASSERT_PTR_EQ(&tcp_server, server); in on_connection() 76 r = uv_tcp_init(server->loop, conn); in on_connection() 79 r = uv_accept(server, (uv_stream_t*)conn); in on_connection() 83 uv_close((uv_handle_t*)server, NULL); in on_connection() 473 uv_tcp_t server; in TEST_IMPL() local 490 ASSERT_EQ(32, server.reqs_pending); in TEST_IMPL() 498 uv_tcp_t server; in TEST_IMPL() local 515 ASSERT_EQ(1, server.reqs_pending); in TEST_IMPL() 619 ASSERT_PTR_EQ(&tcp_server, server); in ipc_on_connection() 650 ASSERT_PTR_EQ(&tcp_server, server); in ipc_on_connection_tcp_conn() [all …]
|
H A D | test-pipe-connect-multiple.c | 44 static void connection_cb(uv_stream_t* server, int status) { in connection_cb() argument 50 r = uv_pipe_init(server->loop, conn, 0); in connection_cb() 53 r = uv_accept(server, (uv_stream_t*)conn); in connection_cb() 58 uv_stop(server->loop); in connection_cb() 110 static void connection_cb2(uv_stream_t* server, int status) { in connection_cb2() argument 116 r = uv_pipe_init(server->loop, conn, 0); in connection_cb2() 119 r = uv_accept(server, (uv_stream_t*)conn); in connection_cb2()
|
H A D | test-udp-recv-in-a-row.c | 29 static uv_udp_t server; variable 82 uv_close((uv_handle_t*) &server, NULL); in check_cb() 94 ASSERT_OK(uv_udp_init(uv_default_loop(), &server)); in TEST_IMPL() 95 ASSERT_OK(uv_udp_bind(&server, (const struct sockaddr*) &addr, 0)); in TEST_IMPL() 96 ASSERT_OK(uv_udp_recv_start(&server, alloc_cb, sv_recv_cb)); in TEST_IMPL()
|
H A D | test-tcp-try-write.c | 31 static uv_tcp_t server; variable 81 uv_close((uv_handle_t*) &server, close_cb); in read_cb() 105 ASSERT_OK(uv_tcp_init(uv_default_loop(), &server)); in start_server() 106 ASSERT_OK(uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); in start_server() 107 ASSERT_OK(uv_listen((uv_stream_t*) &server, 128, connection_cb)); in start_server()
|
/libuv/.github/workflows/ |
H A D | CI-win.yml | 18 runs-on: windows-${{ matrix.config.server }} 24 - {toolchain: Visual Studio 16 2019, arch: Win32, server: 2019} 25 - {toolchain: Visual Studio 16 2019, arch: x64, server: 2019} 26 - {toolchain: Visual Studio 17 2022, arch: Win32, server: 2022} 27 - {toolchain: Visual Studio 17 2022, arch: x64, server: 2022} 30 - {toolchain: Visual Studio 17 2022, arch: arm64, server: 2022} 80 - {arch: i686, server: 2022, libgcc: dw2 } 81 - {arch: x86_64, server: 2022, libgcc: seh } 108 runs-on: windows-${{ matrix.config.server }} 115 - {arch: i686, server: 2022} [all …]
|
/libuv/docs/code/cgi/ |
H A D | main.c | 50 void on_new_connection(uv_stream_t *server, int status) { in on_new_connection() argument 58 if (uv_accept(server, (uv_stream_t*) client) == 0) { in on_new_connection() 69 uv_tcp_t server; in main() local 70 uv_tcp_init(loop, &server); in main() 74 uv_tcp_bind(&server, (const struct sockaddr *)&bind_addr, 0); in main() 75 int r = uv_listen((uv_stream_t*) &server, 128, on_new_connection); in main()
|
/libuv/docs/code/pipe-echo-server/ |
H A D | main.c | 54 void on_new_connection(uv_stream_t *server, int status) { in on_new_connection() argument 62 if (uv_accept(server, (uv_stream_t*) client) == 0) { in on_new_connection() 79 uv_pipe_t server; in main() local 80 uv_pipe_init(loop, &server, 0); in main() 85 if ((r = uv_pipe_bind(&server, PIPENAME))) { in main() 89 if ((r = uv_listen((uv_stream_t*) &server, 128, on_new_connection))) { in main()
|
/libuv/docs/code/tcp-echo-server/ |
H A D | main.c | 55 void on_new_connection(uv_stream_t *server, int status) { in on_new_connection() argument 64 if (uv_accept(server, (uv_stream_t*) client) == 0) { in on_new_connection() 75 uv_tcp_t server; in main() local 76 uv_tcp_init(loop, &server); in main() 80 uv_tcp_bind(&server, (const struct sockaddr*)&addr, 0); in main() 81 int r = uv_listen((uv_stream_t*) &server, DEFAULT_BACKLOG, on_new_connection); in main()
|
/libuv/docs/code/multi-echo-server/ |
H A D | main.c | 31 void on_new_connection(uv_stream_t *server, int status) { in on_new_connection() argument 39 if (uv_accept(server, (uv_stream_t*) client) == 0) { in on_new_connection() 102 uv_tcp_t server; in main() local 103 uv_tcp_init(loop, &server); in main() 107 uv_tcp_bind(&server, (const struct sockaddr *)&bind_addr, 0); in main() 109 if ((r = uv_listen((uv_stream_t*) &server, 128, on_new_connection))) { in main()
|