| /third_party/python/Lib/test/ |
| D | test_socket.py | 10 import socket 57 if not hasattr(socket, 'IOCTL_VM_SOCKETS_GET_LOCAL_CID'): 61 r = fcntl.ioctl(f, socket.IOCTL_VM_SOCKETS_GET_LOCAL_CID, " ") 70 s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) 80 s = socket.socket(socket.PF_CAN, socket.SOCK_DGRAM, socket.CAN_ISOTP) 90 s = socket.socket(socket.PF_CAN, socket.SOCK_DGRAM, socket.CAN_J1939) 100 s = socket.socket(socket.PF_RDS, socket.SOCK_SEQPACKET, 0) 110 s = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0) 120 s = socket.socket(socket.AF_QIPCRTR, socket.SOCK_DGRAM, 0) 138 s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM) [all …]
|
| D | test_smtpd.py | 6 import socket 45 smtpd.socket = asyncore.socket = mock_socket 54 channel.socket.queue_recv(line) 74 asyncore.socket = smtpd.socket = socket 80 smtpd.socket = asyncore.socket = mock_socket 84 channel.socket.queue_recv(line) 167 asyncore.socket = smtpd.socket = socket 172 smtpd.socket = asyncore.socket = mock_socket 176 asyncore.socket = smtpd.socket = socket 181 self.assertEqual(server.socket.family, socket.AF_INET6) [all …]
|
| D | test_timeout.py | 1 """Unit tests for socket timeout feature.""" 10 import socket 21 return socket.getaddrinfo(host, port, socket.AF_INET, 22 socket.SOCK_STREAM)[0][4] 26 """Test case for socket.gettimeout() and socket.settimeout()""" 29 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 35 # Test Socket creation 120 Test the specified socket method. 142 """TCP test case for socket.socket() timeout functions""" 145 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) [all …]
|
| /third_party/python/Doc/library/ |
| D | socket.rst | 1 :mod:`socket` --- Low-level networking interface 4 .. module:: socket 7 **Source code:** :source:`Lib/socket.py` 11 This module provides access to the BSD *socket* interface. It is available on 17 system socket APIs. 22 .. index:: pair: object; socket 26 :func:`.socket` function returns a :dfn:`socket object` whose methods implement 27 the various socket system calls. Parameter types are somewhat higher-level than 39 A TLS/SSL wrapper for socket objects. 42 Socket families [all …]
|
| /third_party/skia/third_party/externals/swiftshader/src/Common/ |
| D | Socket.cpp | 15 #include "Socket.hpp" 28 Socket::Socket(SOCKET socket) : socket(socket) in Socket() argument 32 Socket::Socket(const char *address, const char *port) in Socket() function in sw::Socket 35 socket = INVALID_SOCKET; in Socket() 37 socket = -1; in Socket() 51 socket = ::socket(info->ai_family, info->ai_socktype, info->ai_protocol); in Socket() 52 bind(socket, info->ai_addr, (int)info->ai_addrlen); in Socket() 56 Socket::~Socket() in ~Socket() 59 closesocket(socket); in ~Socket() 61 close(socket); in ~Socket() [all …]
|
| /third_party/skia/third_party/externals/swiftshader/src/System/ |
| D | Socket.cpp | 15 #include "Socket.hpp" 28 Socket::Socket(SOCKET socket) in Socket() argument 29 : socket(socket) in Socket() 33 Socket::Socket(const char *address, const char *port) in Socket() function in sw::Socket 36 socket = INVALID_SOCKET; in Socket() 38 socket = -1; in Socket() 52 socket = ::socket(info->ai_family, info->ai_socktype, info->ai_protocol); in Socket() 53 bind(socket, info->ai_addr, (int)info->ai_addrlen); in Socket() 57 Socket::~Socket() in ~Socket() 60 closesocket(socket); in ~Socket() [all …]
|
| /third_party/python/Lib/test/support/ |
| D | socket_helper.py | 3 import socket 18 def find_unused_port(family=socket.AF_INET, socktype=socket.SOCK_STREAM): 20 achieved by creating a temporary socket with the same family and type as 23 eliciting an unused ephemeral port from the OS. The temporary socket is 27 server socket needs to be bound to a particular port for the duration of 29 a python socket, or if an unused port needs to be provided in a constructor 33 socket is bound to a hard coded port, the ability to run multiple instances 42 the SO_REUSEADDR socket option having different semantics on Windows versus 46 the order bind and listen were called on each socket). 50 accept() is called on each socket, the second caller's process will steal [all …]
|
| /third_party/grpc/src/python/grpcio_tests/tests/unit/framework/common/ |
| D | __init__.py | 18 import socket 21 (socket.SO_REUSEADDR, socket.SO_REUSEPORT) 23 else (socket.SO_REUSEADDR,) 34 """Opens a socket. 41 listen: A boolean value indicating whether or not to listen on the socket. 42 sock_options: A sequence of socket options to apply to the socket. 46 - the address to which the socket is bound 47 - the port to which the socket is bound 48 - the socket object itself 51 if socket.has_ipv6: [all …]
|
| /third_party/python/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] 55 # Create a socket 56 s = socket.socket(addrinfo[0], socket.SOCK_DGRAM) 60 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) [all …]
|
| /third_party/skia/third_party/externals/tint/tools/src/cmd/remote-compile/ |
| D | socket.cc | 15 #include "tools/src/cmd/remote-compile/socket.h" 27 #include <sys/socket.h> 40 using SOCKET = int; typedef 45 constexpr SOCKET InvalidSocket = static_cast<SOCKET>(-1); 63 bool setBlocking(SOCKET s, bool blocking) { in setBlocking() 77 bool errored(SOCKET s) { in errored() 87 class Impl : public Socket { 108 auto socket = in create() local 109 ::socket(info->ai_family, info->ai_socktype, info->ai_protocol); in create() 110 auto out = std::make_shared<Impl>(info, socket); in create() [all …]
|
| D | socket.h | 21 /// Socket provides an OS abstraction to a TCP socket. 22 class Socket { 25 /// @param address the target socket address 26 /// @param port the target socket port 30 /// @returns the connected Socket, or nullptr on failure 31 static std::shared_ptr<Socket> Connect(const char* address, 36 /// Call Accept() on the returned Socket to block and wait for a connection. 37 /// @param address the socket address to listen on. Use "localhost" for 40 /// @param port the socket port to listen on 41 /// @returns the Socket that listens for connections [all …]
|
| /third_party/jerryscript/jerry-debugger/ |
| D | jerry_client_tcp.py | 17 import socket 21 class Socket(object): class 22 """ Create a new socket using the given address family, socket type and protocol number. """ 23 …def __init__(self, address, socket_family=socket.AF_INET, socket_type=socket.SOCK_STREAM, proto=0,… 25 self.socket = socket.socket(socket_family, socket_type, proto, fileno) 29 Connect to a remote socket at address (host, port). 33 self.socket.connect(self.address) 36 """" Mark the socket closed. """ 37 self.socket.close() 41 return self.socket.recv(max_size) [all …]
|
| /third_party/rust/rust/library/std/src/net/ |
| D | udp.rs | 11 /// A UDP socket. 13 /// After creating a `UdpSocket` by [`bind`]ing it to a socket address, data can be 14 /// [sent to] and [received from] any other socket address. 42 /// let socket = UdpSocket::bind("127.0.0.1:34254")?; 44 /// // Receives a single datagram message on the socket. If `buf` is too small to hold 47 /// let (amt, src) = socket.recv_from(&mut buf)?; 52 /// socket.send_to(buf, &src)?; 53 /// } // the socket is closed here 61 /// Creates a UDP socket from the given address. 67 /// each of the addresses until one succeeds and returns the socket. If none [all …]
|
| /third_party/python/Doc/howto/ |
| D | sockets.rst | 4 Socket Programming HOWTO 25 better behavior and performance from a STREAM socket than anything else. I will 26 try to clear up the mystery of what a socket is, as well as some hints on how to 31 Part of the trouble with understanding these things is that "socket" can mean a 33 distinction between a "client" socket - an endpoint of a conversation, and a 34 "server" socket, which is more like a switchboard operator. The client 53 Creating a Socket 59 # create an INET, STREAMing socket 60 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 64 When the ``connect`` completes, the socket ``s`` can be used to send [all …]
|
| /third_party/ltp/utils/sctp/func_tests/ |
| D | test_1_to_1_socket_bind_listen.c | 5 * This file has test cases to test the socket (), bind () and listen () for 8 * socket () Tests: 12 * TEST3: Opening a TCP style socket 18 * TEST6: Invalid socket descriptor 20 * TEST8: On a socket that is already bound 28 * TEST13: Bad socket descriptor 29 * TEST14: Invalid socket 30 * TEST15: Listening a bound socket 67 #include <sys/socket.h> 105 /* socket() TEST1: Invalid domain, EAFNOSUPPORT Expected error */ in main() [all …]
|
| /third_party/python/Lib/ |
| D | socket.py | 5 This module provides socket operations and some related functions. 8 socket are available as methods of the socket object. 12 socket() -- create a new socket object 13 socketpair() -- create a pair of new socket objects [*] 14 fromfd() -- create a socket object from an open file descriptor [*] 15 send_fds() -- Send file descriptor to the socket. 16 recv_fds() -- Receive file descriptors from the socket. 17 fromshare() -- create a socket object from data received from socket.share() [*] 27 socket.getdefaulttimeout() -- get the default timeout value 28 socket.setdefaulttimeout() -- set the default timeout value [all …]
|
| /third_party/iptables/extensions/ |
| D | libxt_socket.txlate | 1 # old socket match, no options. Matches if sk can be found and it is not bound to 0.0.0.0/:: 2 iptables-translate -A INPUT -m socket 3 nft 'add rule ip filter INPUT socket wildcard 0 counter' 5 iptables-translate -A INPUT -m socket --transparent 6 nft 'add rule ip filter INPUT socket wildcard 0 socket transparent 1 counter' 10 iptables-translate -A INPUT -m socket --nowildcard 11 nft 'add rule ip filter INPUT socket wildcard le 1 counter' 13 iptables-translate -A INPUT -m socket --restore-skmark 14 nft 'add rule ip filter INPUT socket wildcard 0 meta mark set socket mark counter' 16 iptables-translate -A INPUT -m socket --transparent --nowildcard --restore-skmark [all …]
|
| /third_party/vk-gl-cts/framework/delibs/decpp/ |
| D | deSocket.cpp | 76 // Socket 78 Socket::Socket (void) in Socket() function in de::Socket 85 Socket::~Socket (void) in ~Socket() 90 void Socket::setFlags (deUint32 flags) in setFlags() 93 throw SocketError("Setting socket flags failed"); in setFlags() 96 void Socket::listen (const SocketAddress& address) in listen() 99 throw SocketError("Listening on socket failed"); in listen() 102 void Socket::connect (const SocketAddress& address) in connect() 105 throw SocketError("Connecting socket failed"); in connect() 108 void Socket::shutdown (void) in shutdown() [all …]
|
| /third_party/grpc/src/core/lib/iomgr/ |
| D | tcp_client_windows.cc | 51 grpc_winsocket* socket; member 61 grpc_winsocket* socket) { in async_connect_unlock_and_cleanup() argument 68 if (socket != NULL) grpc_winsocket_destroy(socket); in async_connect_unlock_and_cleanup() 74 grpc_winsocket* socket = ac->socket; in on_alarm() local 75 ac->socket = NULL; in on_alarm() 76 if (socket != NULL) { in on_alarm() 77 grpc_winsocket_shutdown(socket); in on_alarm() 79 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 …]
|
| /third_party/grpc/test/core/event_engine/posix/ |
| D | posix_engine_listener_utils_test.cc | 17 #include <sys/socket.h> 48 void Append(ListenerSocket socket) override { sockets_.push_back(socket); } in Append() argument 53 for (auto socket = sockets_.begin(); socket != sockets_.end(); ++socket) { in Find() local 54 if (socket->addr.size() == addr.size() && in Find() 55 memcmp(socket->addr.address(), addr.address(), addr.size()) == 0) { in Find() 56 return *socket; in Find() 59 return absl::NotFoundError("Socket not found!"); in Find() 84 for (auto socket = listener_sockets.begin(); socket != listener_sockets.end(); in TEST() local 85 ++socket) { in TEST() 86 ASSERT_TRUE((*socket).addr.address()->sa_family == AF_INET6 || in TEST() [all …]
|
| /third_party/skia/third_party/externals/egl-registry/extensions/NV/ |
| D | EGL_NV_stream_socket.txt | 54 communication using a socket. The application is expected to create 55 and connnect both ends of the socket before creating the stream 61 indicate support for UNIX domain and internet protocol socket types, 63 socket types. The type of socket is important, as certain operations 68 sharing of resources between the socket endpoints. 140 is a remote stream whose communication is established using a socket 142 passed through the socket are implementation dependent, and may be 143 influenced by the stream and socket types. This value for the 155 is created, and provides the handle to a blocking socket which will 161 default value will be an invalid socket handle for the operating [all …]
|
| /third_party/EGL/extensions/NV/ |
| D | EGL_NV_stream_socket.txt | 54 communication using a socket. The application is expected to create 55 and connnect both ends of the socket before creating the stream 61 indicate support for UNIX domain and internet protocol socket types, 63 socket types. The type of socket is important, as certain operations 68 sharing of resources between the socket endpoints. 140 is a remote stream whose communication is established using a socket 142 passed through the socket are implementation dependent, and may be 143 influenced by the stream and socket types. This value for the 155 is created, and provides the handle to a blocking socket which will 161 default value will be an invalid socket handle for the operating [all …]
|
| /third_party/python/Lib/test/test_asyncio/ |
| D | test_sock_lowlevel.py | 1 import socket 77 # in debug mode, socket operations must fail 78 # if the socket is not in blocking mode 130 sock = socket.socket() 132 sock = socket.socket() 176 sock.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 1024) 213 sock.shutdown(socket.SHUT_WR) 219 # the socket needs time to "recover" to make the next connect call. 221 # unpredictable; and on FreeBSD the socket may never come back 258 sock = socket.socket() [all …]
|
| /third_party/grpc/src/core/lib/event_engine/posix_engine/ |
| D | posix_engine_listener_utils.h | 27 // custom interception operations while a socket is Appended. The 33 // Listener socket fd 37 // Socket configuration 39 // Address at which the socket is listening for connections 44 // Adds a socket to the internal db of sockets associated with a listener. 45 virtual void Append(ListenerSocket socket) = 0; 47 // Returns a non-OK status if the socket cannot be found. Otherwise, returns 48 // the socket. 56 // Creates and configures a socket to be used by the EventEngine Listener. The 57 // type of the socket to create is determined by the by the passed address. The [all …]
|
| /third_party/NuttX/include/nuttx/net/ |
| D | net.h | 31 #include <sys/socket.h> 80 /* Socket descriptors are the index into the TCB sockets list, offset by the 82 * socket descriptors 87 /* Capabilities of a socket */ 89 #define SOCKCAP_NONBLOCKING (1 << 0) /* Bit 0: Socket supports non-blocking 107 /* This defines a bitmap big enough for one bit for each socket option */ 119 /* This type defines the type of the socket capabilities set */ 123 /* This callbacks are socket operations that may be performed on a socket of 128 struct socket; /* Forward reference */ 133 CODE int (*si_setup)(FAR struct socket *psock, int protocol); [all …]
|