Home
last modified time | relevance | path

Searched refs:tcp (Results 1 - 25 of 171) sorted by relevance

1234567

/third_party/libuv/test/
H A Dtest-shutdown-eof.c28 static uv_tcp_t tcp; variable
49 ASSERT_PTR_EQ((uv_tcp_t*)t, &tcp); in read_cb()
92 ASSERT_OK(uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); in connect_cb()
95 ASSERT_EQ(UV_EALREADY, uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); in connect_cb()
97 ASSERT_EQ(UV_EINVAL, uv_read_start((uv_stream_t*)&tcp, NULL, read_cb)); in connect_cb()
98 ASSERT_EQ(UV_EINVAL, uv_read_start((uv_stream_t*)&tcp, alloc_cb, NULL)); in connect_cb()
104 uv_write(&write_req, (uv_stream_t*) &tcp, &qbuf, 1, NULL); in connect_cb()
107 uv_shutdown(&shutdown_req, (uv_stream_t*) &tcp, shutdown_cb); in connect_cb()
115 ASSERT_PTR_EQ(handle, (uv_handle_t*) &tcp); in tcp_close_cb()
141 uv_close((uv_handle_t*) &tcp, tcp_close_c in timer_cb()
[all...]
H A Dtest-shutdown-simultaneous.c27 static uv_tcp_t tcp; variable
53 ASSERT_PTR_EQ((uv_tcp_t*)t, &tcp); in read_cb()
68 uv_shutdown(&shutdown_req, (uv_stream_t*) &tcp, shutdown_cb); in read_cb()
86 ASSERT_OK(uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); in connect_cb()
89 ASSERT_EQ(UV_EALREADY, uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); in connect_cb()
91 ASSERT_EQ(UV_EINVAL, uv_read_start((uv_stream_t*)&tcp, NULL, read_cb)); in connect_cb()
92 ASSERT_EQ(UV_EINVAL, uv_read_start((uv_stream_t*)&tcp, alloc_cb, NULL)); in connect_cb()
98 ASSERT_EQ(qbuf.len, uv_try_write((uv_stream_t*) &tcp, &qbuf, 1)); in connect_cb()
117 r = uv_tcp_init(uv_default_loop(), &tcp); in TEST_IMPL()
121 &tcp, in TEST_IMPL()
[all...]
H A Dbenchmark-ping-pongs.c35 uv_tcp_t tcp; member
56 static void buf_alloc(uv_handle_t* tcp, size_t size, uv_buf_t* buf) { in buf_alloc() argument
106 if (uv_write(req, (uv_stream_t*) &pinger->tcp, &buf, 1, pinger_write_cb)) { in pinger_write_ping()
124 static void pinger_read_cb(uv_stream_t* tcp, in pinger_read_cb() argument
130 pinger = (pinger_t*)tcp->data; in pinger_read_cb()
140 uv_close((uv_handle_t*)tcp, pinger_close_cb); in pinger_read_cb()
153 (uv_stream_t*) tcp, in pinger_read_cb()
192 r = uv_tcp_init(loop, &pinger->tcp); in pinger_new()
195 pinger->tcp.data = pinger; in pinger_new()
197 ASSERT_OK(uv_tcp_bind(&pinger->tcp, in pinger_new()
[all...]
H A Dtest-tcp-rst.c25 static uv_tcp_t tcp; variable
34 ASSERT_PTR_EQ(handle, (uv_handle_t*) &tcp); in close_cb()
47 ASSERT_PTR_EQ((uv_tcp_t*) t, &tcp); in read_cb()
65 ASSERT_OK(uv_read_start((uv_stream_t*) &tcp, alloc_cb, read_cb)); in connect_cb()
68 ASSERT_EQ(qbuf.len, uv_try_write((uv_stream_t*) &tcp, &qbuf, 1)); in connect_cb()
90 r = uv_tcp_init(uv_default_loop(), &tcp); in TEST_IMPL()
94 &tcp, in TEST_IMPL()
H A Dtest-connection-fail.c29 static uv_tcp_t tcp; variable
60 /* Close the tcp handle. */ in timer_cb()
61 uv_close((uv_handle_t*)&tcp, on_close); in timer_cb()
69 ASSERT_PTR_EQ((uv_stream_t*) &tcp, req->handle); in on_connect_with_close()
98 r = uv_tcp_init(uv_default_loop(), &tcp); in connection_fail()
103 ASSERT_OK(uv_tcp_bind(&tcp, (const struct sockaddr*) &client_addr, 0)); in connection_fail()
106 &tcp, in connection_fail()
140 * callback of the tcp handle hasn't been made after the failed connection
H A Dtest-handle-fileno.c51 uv_tcp_t tcp; in TEST_IMPL() local
67 r = uv_tcp_init(loop, &tcp); in TEST_IMPL()
69 r = uv_fileno((uv_handle_t*) &tcp, &fd); in TEST_IMPL()
71 r = uv_tcp_bind(&tcp, (const struct sockaddr*) &addr, 0); in TEST_IMPL()
73 r = uv_fileno((uv_handle_t*) &tcp, &fd); in TEST_IMPL()
75 uv_close((uv_handle_t*) &tcp, NULL); in TEST_IMPL()
76 r = uv_fileno((uv_handle_t*) &tcp, &fd); in TEST_IMPL()
H A Dtest-socket-buffer-size.c30 static uv_tcp_t tcp; variable
61 ASSERT_OK(uv_tcp_init(uv_default_loop(), &tcp)); in TEST_IMPL()
62 ASSERT_OK(uv_tcp_bind(&tcp, (struct sockaddr*) &addr, 0)); in TEST_IMPL()
63 check_buffer_size((uv_handle_t*) &tcp); in TEST_IMPL()
64 uv_close((uv_handle_t*) &tcp, close_cb); in TEST_IMPL()
H A Dtest-tcp-writealot.c66 uv_tcp_t* tcp; in shutdown_cb() local
71 tcp = (uv_tcp_t*)(req->handle); in shutdown_cb()
74 ASSERT_OK(tcp->write_queue_size); in shutdown_cb()
84 static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { in read_cb() argument
85 ASSERT_NOT_NULL(tcp); in read_cb()
93 uv_close((uv_handle_t*)tcp, close_cb); in read_cb()
H A Dtest-ping-pong.c47 uv_tcp_t tcp; member
74 if (handle == (uv_handle_t*) &pinger->stream.tcp) { in pinger_on_close()
77 uv_close((uv_handle_t*) &pinger->stream.tcp, ponger_on_close); in pinger_on_close()
98 stream = (uv_stream_t*) &pinger->stream.tcp; in pinger_write_ping()
230 r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp); in tcp_pinger_v6_new()
231 pinger->stream.tcp.data = pinger; in tcp_pinger_v6_new()
237 &pinger->stream.tcp, in tcp_pinger_v6_new()
261 r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp); in tcp_pinger_new()
262 pinger->stream.tcp.data = pinger; in tcp_pinger_new()
268 &pinger->stream.tcp, in tcp_pinger_new()
[all...]
H A Dtest-delayed-accept.c78 static void connection_cb(uv_stream_t* tcp, int status) { in connection_cb() argument
91 timer_handle->data = tcp; in connection_cb()
118 static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { in read_cb() argument
128 ASSERT_NOT_NULL(tcp); in read_cb()
130 uv_close((uv_handle_t*)tcp, close_cb); in read_cb()
H A Dtest-tcp-try-write.c78 static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { in read_cb() argument
80 uv_close((uv_handle_t*) tcp, close_cb); in read_cb()
89 static void connection_cb(uv_stream_t* tcp, int status) { in connection_cb() argument
92 ASSERT_OK(uv_tcp_init(tcp->loop, &incoming)); in connection_cb()
93 ASSERT_OK(uv_accept(tcp, (uv_stream_t*) &incoming)); in connection_cb()
H A Dtest-tcp-try-write-error.c62 static void connection_cb(uv_stream_t* tcp, int status) { in connection_cb() argument
65 ASSERT_OK(uv_tcp_init(tcp->loop, &incoming)); in connection_cb()
66 ASSERT_OK(uv_accept(tcp, (uv_stream_t*) &incoming)); in connection_cb()
70 uv_close((uv_handle_t*) tcp, close_cb); in connection_cb()
H A Dtest-ipc-send-recv.c39 uv_tcp_t tcp; member
126 r = uv_tcp_init(ctx.channel.loop, &recv->tcp); in recv_cb()
252 r = uv_tcp_init(uv_default_loop(), &ctx.send.tcp); in run_ipc_send_recv_tcp()
255 r = uv_tcp_init(uv_default_loop(), &ctx.send2.tcp); in run_ipc_send_recv_tcp()
258 r = uv_tcp_bind(&ctx.send.tcp, (const struct sockaddr*) &addr, 0); in run_ipc_send_recv_tcp()
261 r = uv_tcp_bind(&ctx.send2.tcp, (const struct sockaddr*) &addr, 0); in run_ipc_send_recv_tcp()
337 r = uv_tcp_init(ctx2.channel.loop, &recv->tcp); in read_cb()
H A Dtest-tcp-write-in-a-row.c93 static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {} in read_cb() argument
95 static void connection_cb(uv_stream_t* tcp, int status) { in connection_cb() argument
99 ASSERT_OK(uv_tcp_init(tcp->loop, &incoming)); in connection_cb()
100 ASSERT_OK(uv_accept(tcp, (uv_stream_t*) &incoming)); in connection_cb()
/third_party/libuv/src/unix/
H A Dtcp.c113 int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* tcp, unsigned int flags) { in uv_tcp_init_ex() argument
125 uv__stream_init(loop, (uv_stream_t*)tcp, UV_TCP); in uv_tcp_init_ex()
132 err = new_socket(tcp, domain, 0); in uv_tcp_init_ex()
134 uv__queue_remove(&tcp->handle_queue); in uv_tcp_init_ex()
135 if (tcp->io_watcher.fd != -1) in uv_tcp_init_ex()
136 uv__close(tcp->io_watcher.fd); in uv_tcp_init_ex()
137 tcp->io_watcher.fd = -1; in uv_tcp_init_ex()
146 int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* tcp) { in uv_tcp_init() argument
147 return uv_tcp_init_ex(loop, tcp, AF_UNSPEC); in uv_tcp_init()
151 int uv__tcp_bind(uv_tcp_t* tcp, in uv__tcp_bind() argument
415 uv__tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb) uv__tcp_listen() argument
[all...]
/third_party/node/deps/uv/src/unix/
H A Dtcp.c86 /* Query to see if tcp socket is bound. */ in maybe_new_socket()
114 int uv_tcp_init_ex(uv_loop_t* loop, uv_tcp_t* tcp, unsigned int flags) { in uv_tcp_init_ex() argument
125 uv__stream_init(loop, (uv_stream_t*)tcp, UV_TCP); in uv_tcp_init_ex()
132 int err = maybe_new_socket(tcp, domain, 0); in uv_tcp_init_ex()
134 QUEUE_REMOVE(&tcp->handle_queue); in uv_tcp_init_ex()
143 int uv_tcp_init(uv_loop_t* loop, uv_tcp_t* tcp) { in uv_tcp_init() argument
144 return uv_tcp_init_ex(loop, tcp, AF_UNSPEC); in uv_tcp_init()
148 int uv__tcp_bind(uv_tcp_t* tcp, in uv__tcp_bind() argument
159 err = maybe_new_socket(tcp, addr->sa_family, 0); in uv__tcp_bind()
164 if (setsockopt(tcp in uv__tcp_bind()
340 uv__tcp_listen(uv_tcp_t* tcp, int backlog, uv_connection_cb cb) uv__tcp_listen() argument
[all...]
/third_party/node/deps/uv/src/win/
H A Dtcp.c33 * Threshold of active tcp streams for which to preallocate tcp read buffers.
166 handle->tcp.serv.accept_reqs = NULL; in uv_tcp_init_ex()
167 handle->tcp.serv.pending_accepts = NULL; in uv_tcp_init_ex()
170 handle->tcp.serv.func_acceptex = NULL; in uv_tcp_init_ex()
171 handle->tcp.conn.func_connectex = NULL; in uv_tcp_init_ex()
172 handle->tcp.serv.processed_accepts = 0; in uv_tcp_init_ex()
245 if (!(handle->flags & UV_HANDLE_CONNECTION) && handle->tcp.serv.accept_reqs) { in uv__tcp_endgame()
248 req = &handle->tcp.serv.accept_reqs[i]; in uv__tcp_endgame()
260 uv__free(handle->tcp in uv__tcp_endgame()
1299 uv__tcp_xfer_import(uv_tcp_t* tcp, uv__ipc_socket_xfer_type_t xfer_type, uv__ipc_socket_xfer_info_t* xfer_info) uv__tcp_xfer_import() argument
1411 uv__tcp_try_cancel_reqs(uv_tcp_t* tcp) uv__tcp_try_cancel_reqs() argument
1463 uv__tcp_close(uv_loop_t* loop, uv_tcp_t* tcp) uv__tcp_close() argument
[all...]
/third_party/lwip/src/api/
H A Dapi_msg.c48 #include "lwip/tcp.h"
290 * @see tcp.h (struct tcp_pcb.recv) for parameters and return value
309 LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb);
354 * @see tcp.h (struct tcp_pcb.poll) for parameters and return value
380 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) &&
381 (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) {
391 /* check wether need to poll tcp */
410 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWA
[all...]
/third_party/libuv/src/win/
H A Dtcp.c158 handle->tcp.serv.accept_reqs = NULL; in uv_tcp_init_ex()
159 handle->tcp.serv.pending_accepts = NULL; in uv_tcp_init_ex()
162 handle->tcp.serv.func_acceptex = NULL; in uv_tcp_init_ex()
163 handle->tcp.conn.func_connectex = NULL; in uv_tcp_init_ex()
164 handle->tcp.serv.processed_accepts = 0; in uv_tcp_init_ex()
236 if (!(handle->flags & UV_HANDLE_CONNECTION) && handle->tcp.serv.accept_reqs) { in uv__tcp_endgame()
239 req = &handle->tcp.serv.accept_reqs[i]; in uv__tcp_endgame()
251 uv__free(handle->tcp.serv.accept_reqs); in uv__tcp_endgame()
252 handle->tcp.serv.accept_reqs = NULL; in uv__tcp_endgame()
423 success = handle->tcp in uv__tcp_queue_accept()
1268 uv__tcp_xfer_import(uv_tcp_t* tcp, uv__ipc_socket_xfer_type_t xfer_type, uv__ipc_socket_xfer_info_t* xfer_info) uv__tcp_xfer_import() argument
1379 uv__tcp_try_cancel_reqs(uv_tcp_t* tcp) uv__tcp_try_cancel_reqs() argument
1431 uv__tcp_close(uv_loop_t* loop, uv_tcp_t* tcp) uv__tcp_close() argument
[all...]
/third_party/ffmpeg/libavformat/
H A Dtls_gnutls.c111 ffurl_closep(&c->tls_shared.tcp); in tls_close()
120 int ret = ffurl_read(c->tls_shared.tcp, buf, len); in gnutls_url_pull()
138 int ret = ffurl_write(c->tls_shared.tcp, buf, len); in gnutls_url_push()
252 // Set or clear the AVIO_FLAG_NONBLOCK on c->tls_shared.tcp in tls_read()
253 c->tls_shared.tcp->flags &= ~AVIO_FLAG_NONBLOCK; in tls_read()
254 c->tls_shared.tcp->flags |= h->flags & AVIO_FLAG_NONBLOCK; in tls_read()
267 // Set or clear the AVIO_FLAG_NONBLOCK on c->tls_shared.tcp in tls_write()
268 c->tls_shared.tcp->flags &= ~AVIO_FLAG_NONBLOCK; in tls_write()
269 c->tls_shared.tcp->flags |= h->flags & AVIO_FLAG_NONBLOCK; in tls_write()
281 return ffurl_get_file_handle(c->tls_shared.tcp); in tls_get_file_handle()
[all...]
H A Dtls_openssl.c157 ffurl_closep(&c->tls_shared.tcp); in tls_close()
194 int ret = ffurl_read(c->tls_shared.tcp, buf, len); in url_bio_bread()
210 int ret = ffurl_write(c->tls_shared.tcp, buf, len); in url_bio_bwrite()
338 // Set or clear the AVIO_FLAG_NONBLOCK on c->tls_shared.tcp in tls_read()
339 c->tls_shared.tcp->flags &= ~AVIO_FLAG_NONBLOCK; in tls_read()
340 c->tls_shared.tcp->flags |= h->flags & AVIO_FLAG_NONBLOCK; in tls_read()
353 // Set or clear the AVIO_FLAG_NONBLOCK on c->tls_shared.tcp in tls_write()
354 c->tls_shared.tcp->flags &= ~AVIO_FLAG_NONBLOCK; in tls_write()
355 c->tls_shared.tcp->flags |= h->flags & AVIO_FLAG_NONBLOCK; in tls_write()
367 return ffurl_get_file_handle(c->tls_shared.tcp); in tls_get_file_handle()
[all...]
H A Dtls_libtls.c47 ffurl_closep(&p->tls_shared.tcp); in ff_tls_close()
121 c->tcp, c->host); in ff_tls_open()
125 tls_write_callback, c->tcp); in ff_tls_open()
185 return ffurl_get_file_handle(c->tls_shared.tcp); in tls_get_file_handle()
191 return ffurl_get_short_seek(s->tls_shared.tcp); in tls_get_short_seek()
/third_party/ltp/testcases/network/rpc/basic_tests/rpcinfo/
H A Drpcinfo01.sh15 # Create file with 1 tcp and 1 udp line. Use for variable assignments.
16 rpcinfo -p $(tst_ipaddr) | grep tcp | sed -n 2p > rpc_out
23 TPNUM=$(grep tcp rpc_out | awk '{print $1}')
24 TVNUM=$(grep tcp rpc_out | awk '{print $2}')
25 TCPNAME=$(grep tcp rpc_out | awk '{print $5}')
/third_party/node/src/
H A Dinspector_socket.cc30 uv_tcp_t* tcp() { in tcp() function in node::inspector::TcpHolder
56 ProtocolHandler(InspectorSocket* inspector, TcpHolder::Pointer tcp);
373 WsHandler(InspectorSocket* inspector, TcpHolder::Pointer tcp) in WsHandler() argument
374 : ProtocolHandler(inspector, std::move(tcp)), in WsHandler()
485 explicit HttpHandler(InspectorSocket* inspector, TcpHolder::Pointer tcp) in HttpHandler() argument
486 : ProtocolHandler(inspector, std::move(tcp)), in HttpHandler()
654 TcpHolder::Pointer tcp) in ProtocolHandler()
655 : inspector_(inspector), tcp_(std::move(tcp)) { in ProtocolHandler()
673 int err = uv_tcp_getsockname(tcp_->tcp(), in GetHost()
701 uv_stream_t* tcp in Accept() local
653 ProtocolHandler(InspectorSocket* inspector, TcpHolder::Pointer tcp) ProtocolHandler() argument
746 OnDataReceivedCb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) OnDataReceivedCb() argument
788 auto tcp = TcpHolder::Accept(server, std::move(delegate)); Accept() local
[all...]
/third_party/lwip/test/unit/
H A DFilelists.mk47 $(TESTDIR)/tcp/tcp_helper.c \
48 $(TESTDIR)/tcp/test_tcp_oos.c \
49 $(TESTDIR)/tcp/test_tcp.c \

Completed in 14 milliseconds

1234567