/external/python/cpython3/Lib/test/ |
D | test_socket.py | 8 import socket 53 if not hasattr(socket, 'IOCTL_VM_SOCKETS_GET_LOCAL_CID'): 57 r = fcntl.ioctl(f, socket.IOCTL_VM_SOCKETS_GET_LOCAL_CID, " ") 66 s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) 76 s = socket.socket(socket.PF_CAN, socket.SOCK_DGRAM, socket.CAN_ISOTP) 86 s = socket.socket(socket.PF_CAN, socket.SOCK_DGRAM, socket.CAN_J1939) 96 s = socket.socket(socket.PF_RDS, socket.SOCK_SEQPACKET, 0) 106 s = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0) 116 s = socket.socket(socket.AF_QIPCRTR, socket.SOCK_DGRAM, 0) 134 s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM) [all …]
|
D | test_smtpd.py | 5 import socket 39 smtpd.socket = asyncore.socket = mock_socket 48 channel.socket.queue_recv(line) 68 asyncore.socket = smtpd.socket = socket 74 smtpd.socket = asyncore.socket = mock_socket 78 channel.socket.queue_recv(line) 161 asyncore.socket = smtpd.socket = socket 166 smtpd.socket = asyncore.socket = mock_socket 170 asyncore.socket = smtpd.socket = socket 175 self.assertEqual(server.socket.family, socket.AF_INET6) [all …]
|
/external/llvm-project/clang-tools-extra/test/clang-tidy/checkers/ |
D | android-cloexec-socket.cpp | 15 extern "C" int socket(int domain, int type, int protocol); 18 socket(0, SOCK_STREAM, 0); in a() 21 TEMP_FAILURE_RETRY(socket(0, SOCK_STREAM, 0)); in a() 24 socket(0, SOCK_STREAM | SOCK_DGRAM, 0); in a() 27 TEMP_FAILURE_RETRY(socket(0, SOCK_STREAM | SOCK_DGRAM, 0)); in a() 33 socket(0, 3, 0); in f() 36 TEMP_FAILURE_RETRY(socket(0, 3, 0)); in f() 41 socket(0, flag, 0); in f() 42 TEMP_FAILURE_RETRY(socket(0, flag, 0)); in f() 46 int socket(int domain, int type, int protocol); [all …]
|
/external/webrtc/p2p/base/ |
D | basic_packet_socket_factory.cc | 48 AsyncSocket* socket = in CreateUdpSocket() local 50 if (!socket) { in CreateUdpSocket() 53 if (BindSocket(socket, address, min_port, max_port) < 0) { in CreateUdpSocket() 54 RTC_LOG(LS_ERROR) << "UDP bind failed with error " << socket->GetError(); in CreateUdpSocket() 55 delete socket; in CreateUdpSocket() 58 return new AsyncUDPSocket(socket); in CreateUdpSocket() 72 AsyncSocket* socket = in CreateServerTcpSocket() local 74 if (!socket) { in CreateServerTcpSocket() 78 if (BindSocket(socket, local_address, min_port, max_port) < 0) { in CreateServerTcpSocket() 79 RTC_LOG(LS_ERROR) << "TCP bind failed with error " << socket->GetError(); in CreateServerTcpSocket() [all …]
|
D | tcp_port.cc | 115 delete it->socket; in ~TCPPort() 148 if (rtc::AsyncPacketSocket* socket = GetIncoming(address.address(), true)) { in CreateConnection() local 152 socket->SignalReadPacket.disconnect(this); in CreateConnection() 153 conn = new TCPConnection(this, address, socket); in CreateConnection() 158 if (conn->socket()) { in CreateConnection() 159 conn->socket()->SignalReadyToSend.connect(this, &TCPPort::OnReadyToSend); in CreateConnection() 160 conn->socket()->SignalSentPacket.connect(this, &TCPPort::OnSentPacket); in CreateConnection() 203 rtc::AsyncPacketSocket* socket = NULL; in SendTo() local 214 socket = conn->socket(); in SendTo() 215 if (!socket) { in SendTo() [all …]
|
/external/python/cpython2/Lib/test/ |
D | test_socket.py | 6 import socket 24 def try_address(host, port=0, family=socket.AF_INET): 28 sock = socket.socket(family, socket.SOCK_STREAM) 30 except (socket.error, socket.gaierror): 53 self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 64 self.serv = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 176 self.cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 190 self.cli = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 232 self.serv, self.cli = socket.socketpair() 254 s = _socket.socket(_socket.AF_INET, _socket.SOCK_STREAM) [all …]
|
/external/apache-http/src/org/apache/http/impl/ |
D | SocketHttpClientConnection.java | 66 private Socket socket = null; field in SocketHttpClientConnection 85 final Socket socket, in createSessionInputBuffer() argument 88 return new SocketInputBuffer(socket, buffersize, params); in createSessionInputBuffer() 92 final Socket socket, in createSessionOutputBuffer() argument 95 return new SocketOutputBuffer(socket, buffersize, params); in createSessionOutputBuffer() 99 final Socket socket, in bind() argument 101 if (socket == null) { in bind() 107 this.socket = socket; in bind() 112 createSessionInputBuffer(socket, buffersize, params), in bind() 113 createSessionOutputBuffer(socket, buffersize, params), in bind() [all …]
|
D | SocketHttpServerConnection.java | 66 private Socket socket = null; field in SocketHttpServerConnection 85 final Socket socket, in createHttpDataReceiver() argument 88 return new SocketInputBuffer(socket, buffersize, params); in createHttpDataReceiver() 92 final Socket socket, in createHttpDataTransmitter() argument 95 return new SocketOutputBuffer(socket, buffersize, params); in createHttpDataTransmitter() 98 protected void bind(final Socket socket, final HttpParams params) throws IOException { in bind() argument 99 if (socket == null) { in bind() 105 this.socket = socket; in bind() 110 createHttpDataReceiver(socket, buffersize, params), in bind() 111 createHttpDataTransmitter(socket, buffersize, params), in bind() [all …]
|
/external/python/cpython2/Demo/sockets/ |
D | mcast.py | 19 import socket 32 addrinfo = socket.getaddrinfo(group, None)[0] 34 s = socket.socket(addrinfo[0], socket.SOCK_DGRAM) 38 if addrinfo[0] == socket.AF_INET: # IPv4 39 s.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, ttl_bin) 41 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_HOPS, ttl_bin) 51 addrinfo = socket.getaddrinfo(group, None)[0] 54 s = socket.socket(addrinfo[0], socket.SOCK_DGRAM) 58 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 63 group_bin = socket.inet_pton(addrinfo[0], addrinfo[4][0]) [all …]
|
/external/python/cpython3/Tools/demo/ |
D | mcast.py | 21 import socket 34 addrinfo = socket.getaddrinfo(group, None)[0] 36 s = socket.socket(addrinfo[0], socket.SOCK_DGRAM) 40 if addrinfo[0] == socket.AF_INET: # IPv4 41 s.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, ttl_bin) 43 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_HOPS, ttl_bin) 53 addrinfo = socket.getaddrinfo(group, None)[0] 56 s = socket.socket(addrinfo[0], socket.SOCK_DGRAM) 60 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 65 group_bin = socket.inet_pton(addrinfo[0], addrinfo[4][0]) [all …]
|
/external/python/cpython3/Lib/test/support/ |
D | socket_helper.py | 3 import socket 15 def find_unused_port(family=socket.AF_INET, socktype=socket.SOCK_STREAM): 71 with socket.socket(family, socktype) as tempsock: 91 if sock.family == socket.AF_INET and sock.type == socket.SOCK_STREAM: 92 if hasattr(socket, 'SO_REUSEADDR'): 93 if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) == 1: 97 if hasattr(socket, 'SO_REUSEPORT'): 99 if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1: 108 if hasattr(socket, 'SO_EXCLUSIVEADDRUSE'): 109 sock.setsockopt(socket.SOL_SOCKET, socket.SO_EXCLUSIVEADDRUSE, 1) [all …]
|
/external/usrsctp/usrsctplib/ |
D | user_socketvar.h | 127 struct socket { struct 147 struct socket *so_head; /* (e) back pointer to listen socket */ argument 148 TAILQ_HEAD(, socket) so_incomp; /* (e) queue of partial unaccepted connections */ 149 TAILQ_HEAD(, socket) so_comp; /* (e) queue of complete unaccepted connections */ 150 TAILQ_ENTRY(socket) so_list; /* (e) list of unaccepted connections */ 212 void (*so_upcall)(struct socket *, void *, int); argument 381 struct socket *xso_so; /* makes a convenient handle sometimes */ 559 (struct socket *so, void *arg, int waitflag); 561 (struct socket *so, char *arg); 563 (struct socket *so); [all …]
|
/external/okhttp/okio/okio/src/test/java/okio/ |
D | SocketTimeoutTest.java | 39 Socket socket = socket(ONE_MB, 0); in readWithoutTimeout() local 40 BufferedSource source = Okio.buffer(Okio.source(socket)); in readWithoutTimeout() 43 socket.close(); in readWithoutTimeout() 47 Socket socket = socket(0, 0); in readWithTimeout() local 48 BufferedSource source = Okio.buffer(Okio.source(socket)); in readWithTimeout() 55 socket.close(); in readWithTimeout() 59 Socket socket = socket(0, ONE_MB); in writeWithoutTimeout() local 60 Sink sink = Okio.buffer(Okio.sink(socket)); in writeWithoutTimeout() 65 socket.close(); in writeWithoutTimeout() 69 Socket socket = socket(0, 0); in writeWithTimeout() local [all …]
|
/external/okio/okio/src/jvmTest/java/okio/ |
D | SocketTimeoutTest.java | 39 Socket socket = socket(ONE_MB, 0); in readWithoutTimeout() local 40 BufferedSource source = Okio.buffer(Okio.source(socket)); in readWithoutTimeout() 43 socket.close(); in readWithoutTimeout() 47 Socket socket = socket(0, 0); in readWithTimeout() local 48 BufferedSource source = Okio.buffer(Okio.source(socket)); in readWithTimeout() 55 socket.close(); in readWithTimeout() 59 Socket socket = socket(0, ONE_MB); in writeWithoutTimeout() local 60 Sink sink = Okio.buffer(Okio.sink(socket)); in writeWithoutTimeout() 65 socket.close(); in writeWithoutTimeout() 69 Socket socket = socket(0, 0); in writeWithTimeout() local [all …]
|
/external/rust/crates/grpcio-sys/grpc/src/core/lib/iomgr/ |
D | tcp_client_custom.cc | 39 grpc_custom_socket* socket; member 50 grpc_custom_socket* socket = connect->socket; in custom_tcp_connect_cleanup() local 53 socket->refs--; in custom_tcp_connect_cleanup() 54 if (socket->refs == 0) { in custom_tcp_connect_cleanup() 55 grpc_custom_socket_vtable->destroy(socket); in custom_tcp_connect_cleanup() 56 gpr_free(socket); in custom_tcp_connect_cleanup() 64 grpc_custom_socket* socket = static_cast<grpc_custom_socket*>(acp); in on_alarm() local 65 grpc_custom_tcp_connect* connect = socket->connector; in on_alarm() 75 grpc_custom_socket_vtable->close(socket, custom_close_callback); in on_alarm() 83 static void custom_connect_callback_internal(grpc_custom_socket* socket, in custom_connect_callback_internal() argument [all …]
|
D | tcp_client_windows.cc | 47 grpc_winsocket* socket; member 58 grpc_winsocket* socket) { in async_connect_unlock_and_cleanup() argument 66 if (socket != NULL) grpc_winsocket_destroy(socket); in async_connect_unlock_and_cleanup() 72 grpc_winsocket* socket = ac->socket; in on_alarm() local 73 ac->socket = NULL; in on_alarm() 74 if (socket != NULL) { in on_alarm() 75 grpc_winsocket_shutdown(socket); in on_alarm() 77 async_connect_unlock_and_cleanup(ac, socket); in on_alarm() 89 grpc_winsocket* socket = ac->socket; in on_connect() local 90 ac->socket = NULL; in on_connect() [all …]
|
D | tcp_custom.h | 42 typedef void (*grpc_custom_connect_callback)(grpc_custom_socket* socket, 44 typedef void (*grpc_custom_write_callback)(grpc_custom_socket* socket, 46 typedef void (*grpc_custom_read_callback)(grpc_custom_socket* socket, 48 typedef void (*grpc_custom_accept_callback)(grpc_custom_socket* socket, 51 typedef void (*grpc_custom_close_callback)(grpc_custom_socket* socket); 54 grpc_error* (*init)(grpc_custom_socket* socket, int domain); 55 void (*connect)(grpc_custom_socket* socket, const grpc_sockaddr* addr, 57 void (*destroy)(grpc_custom_socket* socket); 58 void (*shutdown)(grpc_custom_socket* socket); 59 void (*close)(grpc_custom_socket* socket, grpc_custom_close_callback cb); [all …]
|
/external/conscrypt/common/src/main/java/org/conscrypt/ |
D | AbstractConscryptSocket.java | 45 final Socket socket; field in AbstractConscryptSocket 89 this.socket = this; in AbstractConscryptSocket() 97 this.socket = this; in AbstractConscryptSocket() 105 this.socket = this; in AbstractConscryptSocket() 114 this.socket = this; in AbstractConscryptSocket() 123 this.socket = this; in AbstractConscryptSocket() 129 AbstractConscryptSocket(Socket socket, String hostname, int port, boolean autoClose) in AbstractConscryptSocket() argument 131 this.socket = checkNotNull(socket, "socket"); in AbstractConscryptSocket() 153 socket.connect(endpoint, timeout); in connect() 162 socket.bind(bindpoint); in bind() [all …]
|
/external/grpc-grpc/src/core/lib/iomgr/ |
D | tcp_client_custom.cc | 39 grpc_custom_socket* socket; member 50 grpc_custom_socket* socket = connect->socket; in custom_tcp_connect_cleanup() local 54 socket->refs--; in custom_tcp_connect_cleanup() 55 if (socket->refs == 0) { in custom_tcp_connect_cleanup() 56 grpc_custom_socket_vtable->destroy(socket); in custom_tcp_connect_cleanup() 57 gpr_free(socket); in custom_tcp_connect_cleanup() 61 static void custom_close_callback(grpc_custom_socket* socket) {} in custom_close_callback() argument 65 grpc_custom_socket* socket = (grpc_custom_socket*)acp; in on_alarm() local 66 grpc_custom_tcp_connect* connect = socket->connector; in on_alarm() 76 grpc_custom_socket_vtable->close(socket, custom_close_callback); in on_alarm() [all …]
|
D | tcp_client_windows.cc | 46 grpc_winsocket* socket; member 57 grpc_winsocket* socket) { in async_connect_unlock_and_cleanup() argument 66 if (socket != NULL) grpc_winsocket_destroy(socket); in async_connect_unlock_and_cleanup() 72 grpc_winsocket* socket = ac->socket; in on_alarm() local 73 ac->socket = NULL; in on_alarm() 74 if (socket != NULL) { in on_alarm() 75 grpc_winsocket_shutdown(socket); in on_alarm() 77 async_connect_unlock_and_cleanup(ac, socket); in on_alarm() 89 grpc_winsocket* socket = ac->socket; in on_connect() local 90 ac->socket = NULL; in on_connect() [all …]
|
D | tcp_custom.h | 39 typedef void (*grpc_custom_connect_callback)(grpc_custom_socket* socket, 41 typedef void (*grpc_custom_write_callback)(grpc_custom_socket* socket, 43 typedef void (*grpc_custom_read_callback)(grpc_custom_socket* socket, 45 typedef void (*grpc_custom_accept_callback)(grpc_custom_socket* socket, 48 typedef void (*grpc_custom_close_callback)(grpc_custom_socket* socket); 51 grpc_error* (*init)(grpc_custom_socket* socket, int domain); 52 void (*connect)(grpc_custom_socket* socket, const grpc_sockaddr* addr, 54 void (*destroy)(grpc_custom_socket* socket); 55 void (*shutdown)(grpc_custom_socket* socket); 56 void (*close)(grpc_custom_socket* socket, grpc_custom_close_callback cb); [all …]
|
D | socket_windows.cc | 42 grpc_winsocket* grpc_winsocket_create(SOCKET socket, const char* name) { in grpc_winsocket_create() argument 46 r->socket = socket; in grpc_winsocket_create() 55 SOCKET grpc_winsocket_wrapped_socket(grpc_winsocket* socket) { in grpc_winsocket_wrapped_socket() argument 56 return socket->socket; in grpc_winsocket_wrapped_socket() 79 status = WSAIoctl(winsocket->socket, SIO_GET_EXTENSION_FUNCTION_POINTER, in grpc_winsocket_shutdown() 84 DisconnectEx(winsocket->socket, NULL, 0, 0); in grpc_winsocket_shutdown() 91 closesocket(winsocket->socket); in grpc_winsocket_shutdown() 119 static void socket_notify_on_iocp(grpc_winsocket* socket, grpc_closure* closure, in socket_notify_on_iocp() argument 122 gpr_mu_lock(&socket->state_mu); in socket_notify_on_iocp() 129 gpr_mu_unlock(&socket->state_mu); in socket_notify_on_iocp() [all …]
|
/external/autotest/client/cros/netprotos/ |
D | interface_host.py | 6 import socket 34 def socket(self, family, sock_type): member in InterfaceHost 43 if family != socket.AF_INET or sock_type != socket.SOCK_DGRAM: 116 ip_addr_prefix = ord(socket.inet_aton(ip_addr)[0]) 122 self._recv_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 123 self._recv_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 124 self._recv_sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, 125 socket.inet_aton(ip_addr) + 126 socket.inet_aton(self._interface_ip)) 133 self._send_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) [all …]
|
/external/rust/crates/mio/src/sys/unix/ |
D | tcp.rs | 34 pub(crate) fn bind(socket: TcpSocket, addr: SocketAddr) -> io::Result<()> { in bind() 36 syscall!(bind(socket, raw_addr.as_ptr(), raw_addr_length))?; in bind() 40 pub(crate) fn connect(socket: TcpSocket, addr: SocketAddr) -> io::Result<net::TcpStream> { in connect() 43 match syscall!(connect(socket, raw_addr.as_ptr(), raw_addr_length)) { in connect() 48 Ok(unsafe { net::TcpStream::from_raw_fd(socket) }) in connect() 53 pub(crate) fn listen(socket: TcpSocket, backlog: u32) -> io::Result<net::TcpListener> { in listen() 55 syscall!(listen(socket, backlog))?; in listen() 56 Ok(unsafe { net::TcpListener::from_raw_fd(socket) }) in listen() 59 pub(crate) fn close(socket: TcpSocket) { in close() 60 let _ = unsafe { net::TcpStream::from_raw_fd(socket) }; in close() [all …]
|
/external/webrtc/rtc_base/ |
D | test_utils.h | 65 void Monitor(rtc::AsyncSocket* socket) { in Monitor() argument 66 socket->SignalConnectEvent.connect(this, &StreamSink::OnConnectEvent); in Monitor() 67 socket->SignalReadEvent.connect(this, &StreamSink::OnReadEvent); in Monitor() 68 socket->SignalWriteEvent.connect(this, &StreamSink::OnWriteEvent); in Monitor() 69 socket->SignalCloseEvent.connect(this, &StreamSink::OnCloseEvent); in Monitor() 71 events_.erase(socket); in Monitor() 73 void Unmonitor(rtc::AsyncSocket* socket) { in Unmonitor() argument 74 socket->SignalConnectEvent.disconnect(this); in Unmonitor() 75 socket->SignalReadEvent.disconnect(this); in Unmonitor() 76 socket->SignalWriteEvent.disconnect(this); in Unmonitor() [all …]
|