/external/aws-sdk-java-v2/http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/internal/net/ |
D | DelegateSslSocket.java | 32 protected final SSLSocket sock; field in DelegateSslSocket 34 public DelegateSslSocket(SSLSocket sock) { in DelegateSslSocket() argument 35 this.sock = sock; in DelegateSslSocket() 40 sock.connect(endpoint); in connect() 45 sock.connect(endpoint, timeout); in connect() 50 sock.bind(bindpoint); in bind() 55 return sock.getInetAddress(); in getInetAddress() 60 return sock.getLocalAddress(); in getLocalAddress() 65 return sock.getPort(); in getPort() 70 return sock.getLocalPort(); in getLocalPort() [all …]
|
D | DelegateSocket.java | 35 protected final Socket sock; field in DelegateSocket 37 public DelegateSocket(Socket sock) { in DelegateSocket() argument 38 this.sock = sock; in DelegateSocket() 43 sock.connect(endpoint); in connect() 48 sock.connect(endpoint, timeout); in connect() 53 sock.bind(bindpoint); in bind() 58 return sock.getInetAddress(); in getInetAddress() 63 return sock.getLocalAddress(); in getLocalAddress() 68 return sock.getPort(); in getPort() 73 return sock.getLocalPort(); in getLocalPort() [all …]
|
/external/cronet/stable/third_party/apache-portable-runtime/src/network_io/win32/ |
D | sockopt.c | 53 APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t) in apr_socket_timeout_set() argument 59 if (sock->timeout != 0) { in apr_socket_timeout_set() 60 if ((stat = sononblock(sock->socketdes)) != APR_SUCCESS) in apr_socket_timeout_set() 66 if (sock->timeout == 0 || apr_is_option_set(sock, APR_SO_NONBLOCK)) { in apr_socket_timeout_set() 67 if ((stat = soblock(sock->socketdes)) != APR_SUCCESS) in apr_socket_timeout_set() 69 apr_set_option(sock, APR_SO_NONBLOCK, 0); in apr_socket_timeout_set() 72 if (sock->timeout != t) in apr_socket_timeout_set() 75 sock->timeout_ms = (int)apr_time_as_msec(t); in apr_socket_timeout_set() 76 setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVTIMEO, in apr_socket_timeout_set() 77 (char *) &sock->timeout_ms, in apr_socket_timeout_set() [all …]
|
D | sockets.c | 29 static apr_status_t socket_cleanup(void *sock) in socket_cleanup() argument 31 apr_socket_t *thesocket = sock; in socket_cleanup() 48 static void set_socket_vars(apr_socket_t *sock, int family, int type, int protocol) in set_socket_vars() argument 50 sock->type = type; in set_socket_vars() 51 sock->protocol = protocol; in set_socket_vars() 52 apr_sockaddr_vars_set(sock->local_addr, family, 0); in set_socket_vars() 53 apr_sockaddr_vars_set(sock->remote_addr, family, 0); in set_socket_vars() 57 apr_set_option(sock, APR_IPV6_V6ONLY, 1); in set_socket_vars() 79 APR_DECLARE(apr_status_t) apr_socket_protocol_get(apr_socket_t *sock, in apr_socket_protocol_get() argument 82 *protocol = sock->protocol; in apr_socket_protocol_get() [all …]
|
/external/cronet/tot/third_party/apache-portable-runtime/src/network_io/win32/ |
D | sockopt.c | 53 APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t) in apr_socket_timeout_set() argument 59 if (sock->timeout != 0) { in apr_socket_timeout_set() 60 if ((stat = sononblock(sock->socketdes)) != APR_SUCCESS) in apr_socket_timeout_set() 66 if (sock->timeout == 0 || apr_is_option_set(sock, APR_SO_NONBLOCK)) { in apr_socket_timeout_set() 67 if ((stat = soblock(sock->socketdes)) != APR_SUCCESS) in apr_socket_timeout_set() 69 apr_set_option(sock, APR_SO_NONBLOCK, 0); in apr_socket_timeout_set() 72 if (sock->timeout != t) in apr_socket_timeout_set() 75 sock->timeout_ms = (int)apr_time_as_msec(t); in apr_socket_timeout_set() 76 setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVTIMEO, in apr_socket_timeout_set() 77 (char *) &sock->timeout_ms, in apr_socket_timeout_set() [all …]
|
D | sockets.c | 29 static apr_status_t socket_cleanup(void *sock) in socket_cleanup() argument 31 apr_socket_t *thesocket = sock; in socket_cleanup() 48 static void set_socket_vars(apr_socket_t *sock, int family, int type, int protocol) in set_socket_vars() argument 50 sock->type = type; in set_socket_vars() 51 sock->protocol = protocol; in set_socket_vars() 52 apr_sockaddr_vars_set(sock->local_addr, family, 0); in set_socket_vars() 53 apr_sockaddr_vars_set(sock->remote_addr, family, 0); in set_socket_vars() 57 apr_set_option(sock, APR_IPV6_V6ONLY, 1); in set_socket_vars() 79 APR_DECLARE(apr_status_t) apr_socket_protocol_get(apr_socket_t *sock, in apr_socket_protocol_get() argument 82 *protocol = sock->protocol; in apr_socket_protocol_get() [all …]
|
/external/cronet/stable/third_party/apache-portable-runtime/src/network_io/unix/ |
D | sockopt.c | 75 apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t) in apr_socket_timeout_set() argument 86 if (t >= 0 && sock->timeout < 0) { in apr_socket_timeout_set() 87 if (apr_is_option_set(sock, APR_SO_NONBLOCK) != 1) { in apr_socket_timeout_set() 88 if ((stat = sononblock(sock->socketdes)) != APR_SUCCESS) { in apr_socket_timeout_set() 91 apr_set_option(sock, APR_SO_NONBLOCK, 1); in apr_socket_timeout_set() 94 else if (t < 0 && sock->timeout >= 0) { in apr_socket_timeout_set() 95 if (apr_is_option_set(sock, APR_SO_NONBLOCK) != 0) { in apr_socket_timeout_set() 96 if ((stat = soblock(sock->socketdes)) != APR_SUCCESS) { in apr_socket_timeout_set() 99 apr_set_option(sock, APR_SO_NONBLOCK, 0); in apr_socket_timeout_set() 106 sock->options &= ~APR_INCOMPLETE_READ; in apr_socket_timeout_set() [all …]
|
D | sockets.c | 31 static apr_status_t socket_cleanup(void *sock) in socket_cleanup() argument 33 apr_socket_t *thesocket = sock; in socket_cleanup() 52 static void set_socket_vars(apr_socket_t *sock, int family, int type, int protocol) in set_socket_vars() argument 54 sock->type = type; in set_socket_vars() 55 sock->protocol = protocol; in set_socket_vars() 56 apr_sockaddr_vars_set(sock->local_addr, family, 0); in set_socket_vars() 57 apr_sockaddr_vars_set(sock->remote_addr, family, 0); in set_socket_vars() 58 sock->options = 0; in set_socket_vars() 63 sock->options |= APR_TCP_NODELAY; in set_socket_vars() 85 apr_status_t apr_socket_protocol_get(apr_socket_t *sock, int *protocol) in apr_socket_protocol_get() argument [all …]
|
D | sendrecv.c | 30 apr_status_t apr_socket_send(apr_socket_t *sock, const char *buf, in apr_socket_send() argument 35 if (sock->options & APR_INCOMPLETE_WRITE) { in apr_socket_send() 36 sock->options &= ~APR_INCOMPLETE_WRITE; in apr_socket_send() 41 rv = write(sock->socketdes, buf, (*len)); in apr_socket_send() 45 && (sock->timeout > 0)) { in apr_socket_send() 48 arv = apr_wait_for_io_or_timeout(NULL, sock, 0); in apr_socket_send() 55 rv = write(sock->socketdes, buf, (*len)); in apr_socket_send() 63 if ((sock->timeout > 0) && (rv < *len)) { in apr_socket_send() 64 sock->options |= APR_INCOMPLETE_WRITE; in apr_socket_send() 70 apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len) in apr_socket_recv() argument [all …]
|
/external/cronet/tot/third_party/apache-portable-runtime/src/network_io/unix/ |
D | sockopt.c | 75 apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t) in apr_socket_timeout_set() argument 86 if (t >= 0 && sock->timeout < 0) { in apr_socket_timeout_set() 87 if (apr_is_option_set(sock, APR_SO_NONBLOCK) != 1) { in apr_socket_timeout_set() 88 if ((stat = sononblock(sock->socketdes)) != APR_SUCCESS) { in apr_socket_timeout_set() 91 apr_set_option(sock, APR_SO_NONBLOCK, 1); in apr_socket_timeout_set() 94 else if (t < 0 && sock->timeout >= 0) { in apr_socket_timeout_set() 95 if (apr_is_option_set(sock, APR_SO_NONBLOCK) != 0) { in apr_socket_timeout_set() 96 if ((stat = soblock(sock->socketdes)) != APR_SUCCESS) { in apr_socket_timeout_set() 99 apr_set_option(sock, APR_SO_NONBLOCK, 0); in apr_socket_timeout_set() 106 sock->options &= ~APR_INCOMPLETE_READ; in apr_socket_timeout_set() [all …]
|
D | sockets.c | 31 static apr_status_t socket_cleanup(void *sock) in socket_cleanup() argument 33 apr_socket_t *thesocket = sock; in socket_cleanup() 52 static void set_socket_vars(apr_socket_t *sock, int family, int type, int protocol) in set_socket_vars() argument 54 sock->type = type; in set_socket_vars() 55 sock->protocol = protocol; in set_socket_vars() 56 apr_sockaddr_vars_set(sock->local_addr, family, 0); in set_socket_vars() 57 apr_sockaddr_vars_set(sock->remote_addr, family, 0); in set_socket_vars() 58 sock->options = 0; in set_socket_vars() 63 sock->options |= APR_TCP_NODELAY; in set_socket_vars() 85 apr_status_t apr_socket_protocol_get(apr_socket_t *sock, int *protocol) in apr_socket_protocol_get() argument [all …]
|
D | sendrecv.c | 30 apr_status_t apr_socket_send(apr_socket_t *sock, const char *buf, in apr_socket_send() argument 35 if (sock->options & APR_INCOMPLETE_WRITE) { in apr_socket_send() 36 sock->options &= ~APR_INCOMPLETE_WRITE; in apr_socket_send() 41 rv = write(sock->socketdes, buf, (*len)); in apr_socket_send() 45 && (sock->timeout > 0)) { in apr_socket_send() 48 arv = apr_wait_for_io_or_timeout(NULL, sock, 0); in apr_socket_send() 55 rv = write(sock->socketdes, buf, (*len)); in apr_socket_send() 63 if ((sock->timeout > 0) && (rv < *len)) { in apr_socket_send() 64 sock->options |= APR_INCOMPLETE_WRITE; in apr_socket_send() 70 apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len) in apr_socket_recv() argument [all …]
|
D | multicast.c | 95 static int sock_is_ipv4(apr_socket_t *sock) in sock_is_ipv4() argument 97 if (sock->local_addr->family == APR_INET) in sock_is_ipv4() 103 static int sock_is_ipv6(apr_socket_t *sock) in sock_is_ipv6() argument 105 if (sock->local_addr->family == APR_INET6) in sock_is_ipv6() 111 static apr_status_t do_mcast(int type, apr_socket_t *sock, in do_mcast() argument 127 if (sock_is_ipv4(sock)) { in do_mcast() 131 else if (sock_is_ipv6(sock)) { in do_mcast() 150 if (setsockopt(sock->socketdes, ip_proto, type, (const void *) &mip, in do_mcast() 160 if (sock_is_ipv4(sock)) { in do_mcast() 164 if (setsockopt(sock->socketdes, IPPROTO_IP, type, in do_mcast() [all …]
|
/external/python/cpython3/Lib/test/ |
D | test_timeout.py | 29 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 32 self.sock.close() 36 self.assertEqual(self.sock.gettimeout(), None, 41 self.sock.settimeout(7.345) 42 self.assertEqual(self.sock.gettimeout(), 7.345) 44 self.sock.settimeout(3) 45 self.assertEqual(self.sock.gettimeout(), 3) 47 self.sock.settimeout(None) 48 self.assertEqual(self.sock.gettimeout(), None) 52 self.sock.settimeout(1) [all …]
|
/external/deqp/framework/delibs/deutil/ |
D | deSocket.c | 428 deSocket *sock = (deSocket *)deCalloc(sizeof(deSocket)); in deSocket_create() local 429 if (!sock) in deSocket_create() 430 return sock; in deSocket_create() 438 sock->stateLock = deMutex_create(0); in deSocket_create() 439 sock->handle = DE_INVALID_SOCKET_HANDLE; in deSocket_create() 440 sock->state = DE_SOCKETSTATE_CLOSED; in deSocket_create() 442 return sock; in deSocket_create() 445 void deSocket_destroy(deSocket *sock) in deSocket_destroy() argument 447 if (sock->state != DE_SOCKETSTATE_CLOSED) in deSocket_destroy() 448 deSocket_close(sock); in deSocket_destroy() [all …]
|
/external/grpc-grpc/test/core/iomgr/ |
D | socket_utils_test.cc | 107 int sock = socket(PF_INET, SOCK_STREAM, 0); in test_with_vtable() local 108 ASSERT_GT(sock, 0); in test_with_vtable() 116 grpc_set_socket_with_mutator(sock, GRPC_FD_CLIENT_CONNECTION_USAGE, in test_with_vtable() 122 grpc_set_socket_with_mutator(sock, GRPC_FD_CLIENT_CONNECTION_USAGE, in test_with_vtable() 128 grpc_set_socket_with_mutator(sock, GRPC_FD_CLIENT_CONNECTION_USAGE, in test_with_vtable() 133 sock, GRPC_FD_CLIENT_CONNECTION_USAGE, in test_with_vtable() 138 static void test_set_socket_dscp(int sock, int dscp) { in test_set_socket_dscp() argument 144 ASSERT_TRUE(getsockopt(sock, IPPROTO_IP, IP_TOS, &optval, &optlen) == 0); in test_set_socket_dscp() 148 GRPC_LOG_IF_ERROR("set_socket_dscp", grpc_set_socket_dscp(sock, dscp))); in test_set_socket_dscp() 151 ASSERT_TRUE(getsockopt(sock, IPPROTO_IP, IP_TOS, &optval, &optlen) == 0); in test_set_socket_dscp() [all …]
|
/external/python/cpython3/Lib/test/test_asyncio/ |
D | test_sock_lowlevel.py | 79 def _basetest_sock_client_ops(self, httpd, sock): argument 84 sock.setblocking(True) 87 self.loop.sock_connect(sock, httpd.address)) 90 self.loop.sock_sendall(sock, b'GET / HTTP/1.0\r\n\r\n')) 93 self.loop.sock_recv(sock, 1024)) 96 self.loop.sock_recv_into(sock, bytearray())) 99 self.loop.sock_accept(sock)) 102 sock.setblocking(False) 104 self.loop.sock_connect(sock, httpd.address)) 106 self.loop.sock_sendall(sock, b'GET / HTTP/1.0\r\n\r\n')) [all …]
|
/external/cronet/stable/third_party/apache-portable-runtime/src/network_io/os2/ |
D | sockets.c | 33 static apr_status_t socket_cleanup(void *sock) in socket_cleanup() argument 35 apr_socket_t *thesocket = sock; in socket_cleanup() 50 static void set_socket_vars(apr_socket_t *sock, int family, int type, int protocol) in set_socket_vars() argument 52 sock->type = type; in set_socket_vars() 53 sock->protocol = protocol; in set_socket_vars() 54 apr_sockaddr_vars_set(sock->local_addr, family, 0); in set_socket_vars() 55 apr_sockaddr_vars_set(sock->remote_addr, family, 0); in set_socket_vars() 76 APR_DECLARE(apr_status_t) apr_socket_protocol_get(apr_socket_t *sock, int *protocol) in apr_socket_protocol_get() argument 78 *protocol = sock->protocol; in apr_socket_protocol_get() 136 APR_DECLARE(apr_status_t) apr_socket_bind(apr_socket_t *sock, in apr_socket_bind() argument [all …]
|
/external/cronet/tot/third_party/apache-portable-runtime/src/network_io/os2/ |
D | sockets.c | 33 static apr_status_t socket_cleanup(void *sock) in socket_cleanup() argument 35 apr_socket_t *thesocket = sock; in socket_cleanup() 50 static void set_socket_vars(apr_socket_t *sock, int family, int type, int protocol) in set_socket_vars() argument 52 sock->type = type; in set_socket_vars() 53 sock->protocol = protocol; in set_socket_vars() 54 apr_sockaddr_vars_set(sock->local_addr, family, 0); in set_socket_vars() 55 apr_sockaddr_vars_set(sock->remote_addr, family, 0); in set_socket_vars() 76 APR_DECLARE(apr_status_t) apr_socket_protocol_get(apr_socket_t *sock, int *protocol) in apr_socket_protocol_get() argument 78 *protocol = sock->protocol; in apr_socket_protocol_get() 136 APR_DECLARE(apr_status_t) apr_socket_bind(apr_socket_t *sock, in apr_socket_bind() argument [all …]
|
/external/ublksrv/nbd/ |
D | nbd-client.c | 58 int sock; in opennet() local 90 sock = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); in opennet() 92 if(sock == -1) in opennet() 95 if(connect(sock, rp->ai_addr, rp->ai_addrlen) != -1) in opennet() 98 close(sock); in opennet() 103 sock = -1; in opennet() 107 setmysockopt(sock); in opennet() 110 return sock; in opennet() 114 int sock; in openunix() local 126 if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { in openunix() [all …]
|
/external/perfetto/ui/src/plugins/dev.perfetto.RecordTraceV2/websocket/ |
D | async_websocket.ts | 33 private sock?: WebSocket; 40 const sock = new WebSocket(url); constant 41 sock.binaryType = 'arraybuffer'; 49 const readyState = sock.readyState; 55 sock.onclose = null; 56 sock.onopen = null; 58 connectPromise.resolve(new AsyncWebsocket(sock)); 63 sock.onopen = () => resolveConnectPromise(true); 64 sock.onclose = () => resolveConnectPromise(false); 68 private constructor(sock: WebSocket) { [all …]
|
/external/crosvm/base/src/sys/unix/ |
D | stream_channel.rs | 73 SocketType::Byte(sock) => sock.set_nonblocking(nonblocking), in set_nonblocking() 74 SocketType::Message(sock) => sock.set_nonblocking(nonblocking), in set_nonblocking() 87 SocketType::Byte(sock) => (&mut &*sock).read(buf), in inner_read() 102 SocketType::Message(sock) => { in inner_read() 110 sock.as_raw_descriptor(), in inner_read() 163 SocketType::Byte(sock) => sock.set_read_timeout(timeout), in set_read_timeout() 164 SocketType::Message(sock) => sock.set_read_timeout(timeout), in set_read_timeout() 170 SocketType::Byte(sock) => sock.set_write_timeout(timeout), in set_write_timeout() 171 SocketType::Message(sock) => sock.set_write_timeout(timeout), in set_write_timeout() 180 SocketType::Byte(sock) => SocketType::Byte(sock.try_clone()?), in try_clone() [all …]
|
/external/cronet/tot/third_party/apache-portable-runtime/src/network_io/beos/ |
D | sendrecv.c | 24 static apr_status_t wait_for_io_or_timeout(apr_socket_t *sock, int for_read) in wait_for_io_or_timeout() argument 32 FD_SET(sock->socketdes, &fdset); in wait_for_io_or_timeout() 33 if (sock->timeout < 0) { in wait_for_io_or_timeout() 37 tv.tv_sec = sock->timeout / APR_USEC_PER_SEC; in wait_for_io_or_timeout() 38 tv.tv_usec = sock->timeout % APR_USEC_PER_SEC; in wait_for_io_or_timeout() 41 srv = select(sock->socketdes + 1, in wait_for_io_or_timeout() 60 APR_DECLARE(apr_status_t) apr_socket_send(apr_socket_t *sock, const char *buf, in apr_socket_send() argument 66 rv = send(sock->socketdes, buf, (*len), 0); in apr_socket_send() 69 if (rv == -1 && errno == EWOULDBLOCK && sock->timeout > 0) { in apr_socket_send() 74 rv = send(sock->socketdes, buf, (*len), 0); in apr_socket_send() [all …]
|
/external/cronet/stable/third_party/apache-portable-runtime/src/network_io/beos/ |
D | sendrecv.c | 24 static apr_status_t wait_for_io_or_timeout(apr_socket_t *sock, int for_read) in wait_for_io_or_timeout() argument 32 FD_SET(sock->socketdes, &fdset); in wait_for_io_or_timeout() 33 if (sock->timeout < 0) { in wait_for_io_or_timeout() 37 tv.tv_sec = sock->timeout / APR_USEC_PER_SEC; in wait_for_io_or_timeout() 38 tv.tv_usec = sock->timeout % APR_USEC_PER_SEC; in wait_for_io_or_timeout() 41 srv = select(sock->socketdes + 1, in wait_for_io_or_timeout() 60 APR_DECLARE(apr_status_t) apr_socket_send(apr_socket_t *sock, const char *buf, in apr_socket_send() argument 66 rv = send(sock->socketdes, buf, (*len), 0); in apr_socket_send() 69 if (rv == -1 && errno == EWOULDBLOCK && sock->timeout > 0) { in apr_socket_send() 74 rv = send(sock->socketdes, buf, (*len), 0); in apr_socket_send() [all …]
|
/external/wmediumd/tests/ |
D | wmediumd_ack_test_client.c | 25 int write_fixed(int sock, void *data, int len) { in write_fixed() argument 30 int actual_written = write(sock, ((char *)data) + pos, remain); in write_fixed() 43 int read_fixed(int sock, void *data, int len) { in read_fixed() argument 48 int actual_read = read(sock, ((char *)data) + pos, remain); in read_fixed() 61 int wmediumd_send_packet(int sock, uint32_t type, void *data, uint32_t len) { in wmediumd_send_packet() argument 67 write_fixed(sock, &header, sizeof(uint32_t) * 2); in wmediumd_send_packet() 70 write_fixed(sock, data, len); in wmediumd_send_packet() 76 int wmediumd_read_packet(int sock) { in wmediumd_read_packet() argument 79 read_fixed(sock, &header, sizeof(uint32_t) * 2); in wmediumd_read_packet() 84 read_fixed(sock, buf, header.data_len); in wmediumd_read_packet() [all …]
|