Home
last modified time | relevance | path

Searched full:socket (Results 1 – 25 of 6097) sorted by relevance

12345678910>>...244

/external/sl4a/Common/src/com/googlecode/android_scripting/facade/net/
DSocketFacade.java40 import java.net.Socket;
46 * This class has APIs for various socket types
47 * android.system.Os socket used for UDP and TCP sockets
49 * java.net.Socket and java.net.ServerSocket for TCP sockets
55 private static HashMap<String, Socket> sSocketHashMap =
56 new HashMap<String, Socket>();
73 private String getDatagramSocketId(DatagramSocket socket) { in getDatagramSocketId() argument
74 return "DATAGRAMSOCKET:" + socket.hashCode(); in getDatagramSocketId()
78 * Method to return hash value of a Socket object
82 private String getSocketId(Socket socket) { in getSocketId() argument
[all …]
/external/python/cpython3/Lib/test/
Dtest_socket.py10 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 …]
/external/python/cpython2/Doc/library/
Dsocket.rst1 :mod:`socket` --- Low-level networking interface
4 .. module:: socket
8 This module provides access to the BSD *socket* interface. It is available on
15 system socket APIs.
17 For an introduction to socket programming (in C), see the following papers: An
22 socket-related system calls are also a valuable source of information on the
23 details of socket semantics. For Unix, refer to the manual pages; for Windows,
25 want to refer to :rfc:`3493` titled Basic Socket Interface Extensions for IPv6.
27 .. index:: object: socket
31 :func:`.socket` function returns a :dfn:`socket object` whose methods implement
[all …]
/external/python/cpython2/Lib/test/
Dtest_socket.py6 import socket
24 def try_address(host, port=0, family=socket.AF_INET):
25 """Try to bind a socket on the given host:port and return True
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()
[all …]
/external/python/cpython3/Doc/library/
Dsocket.rst1 :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 …]
/external/parameter-framework/asio-1.10.6/include/asio/
Dsocket_base.hpp30 /// Different ways a socket may be shutdown.
50 /// Socket option to permit sending of broadcast messages.
52 * Implements the SOL_SOCKET/SO_BROADCAST socket option.
57 * asio::ip::udp::socket socket(io_service);
60 * socket.set_option(option);
66 * asio::ip::udp::socket socket(io_service);
69 * socket.get_option(option);
80 /// Socket option to enable socket-level debugging.
82 * Implements the SOL_SOCKET/SO_DEBUG socket option.
87 * asio::ip::tcp::socket socket(io_service);
[all …]
Dbasic_socket.hpp28 /// Provides socket functionality.
44 /// socket.
47 /// The native representation of a socket.
61 * This constructor creates a socket without opening it.
63 * @param io_service The io_service object that the socket will use to
64 * dispatch handlers for any asynchronous operations performed on the socket.
73 * This constructor creates and opens a socket.
75 * @param io_service The io_service object that the socket will use to
76 * dispatch handlers for any asynchronous operations performed on the socket.
94 * This constructor creates a socket and automatically opens it bound to the
[all …]
/external/sdv/vsomeip/third_party/boost/asio/include/boost/asio/
Dsocket_base.hpp34 /// Different ways a socket may be shutdown.
38 /// Shutdown the receive side of the socket.
41 /// Shutdown the send side of the socket.
44 /// Shutdown both send and receive on the socket.
85 /// Wait for a socket to become ready to read.
88 /// Wait for a socket to become ready to write.
91 /// Wait for a socket to have error conditions pending.
95 /// Socket option to permit sending of broadcast messages.
97 * Implements the SOL_SOCKET/SO_BROADCAST socket option.
102 * boost::asio::ip::udp::socket socket(my_context);
[all …]
Dbasic_socket.hpp57 /// Provides socket functionality.
74 /// Rebinds the socket type to another executor.
78 /// The socket type when rebound to the specified executor.
82 /// The native representation of a socket.
109 * This constructor creates a socket without opening it.
111 * @param ex The I/O executor that the socket will use, by default, to
112 * dispatch handlers for any asynchronous operations performed on the socket.
121 * This constructor creates a socket without opening it.
124 * the socket will use, by default, to dispatch handlers for any asynchronous
125 * operations performed on the socket.
[all …]
/external/webrtc/p2p/base/
Dbasic_packet_socket_factory.cc25 #include "rtc_base/socket.h"
42 Socket* socket = socket_factory_->CreateSocket(address.family(), SOCK_DGRAM); in CreateUdpSocket() local
43 if (!socket) { in CreateUdpSocket()
46 if (BindSocket(socket, address, min_port, max_port) < 0) { in CreateUdpSocket()
47 RTC_LOG(LS_ERROR) << "UDP bind failed with error " << socket->GetError(); in CreateUdpSocket()
48 delete socket; in CreateUdpSocket()
51 return new AsyncUDPSocket(socket); in CreateUdpSocket()
69 Socket* socket = in CreateServerTcpSocket() local
71 if (!socket) { in CreateServerTcpSocket()
75 if (BindSocket(socket, local_address, min_port, max_port) < 0) { in CreateServerTcpSocket()
[all …]
/external/pigweed/pw_console/py/pw_console/
Dsocket_client.py14 """Wrapers for socket clients to log read and write data."""
21 import socket
30 """Socket transport implementation."""
38 socket.AddressFamily, int # pylint: disable=no-member
49 """Creates a socket connection.
52 config: The socket configuration. Accepted values and formats are:
58 'file:path_to_file' - A Unix socket at ``path_to_file``.
61 on_disconnect: An optional callback called when the socket
65 TypeError: The type of socket is not supported.
66 ValueError: The socket configuration is invalid.
[all …]
/external/webrtc/rtc_base/
Dasync_tcp_socket.h20 #include "rtc_base/socket.h"
30 AsyncTCPSocketBase(Socket* socket, size_t max_packet_size);
51 int GetOption(Socket::Option opt, int* value) override;
52 int SetOption(Socket::Option opt, int value) override;
57 // Binds and connects `socket` and creates AsyncTCPSocket for
58 // it. Takes ownership of `socket`. Returns null if bind() or
59 // connect() fail (`socket` is destroyed in that case).
60 static Socket* ConnectSocket(Socket* socket,
72 // Called by the underlying socket
73 void OnConnectEvent(Socket* socket);
[all …]
Dtest_utils.h19 #include "rtc_base/socket.h"
26 // StreamSink - Monitor asynchronously signalled events from Socket.
45 void Monitor(rtc::Socket* socket) { in Monitor() argument
46 socket->SignalConnectEvent.connect(this, &StreamSink::OnConnectEvent); in Monitor()
47 socket->SignalReadEvent.connect(this, &StreamSink::OnReadEvent); in Monitor()
48 socket->SignalWriteEvent.connect(this, &StreamSink::OnWriteEvent); in Monitor()
49 socket->SignalCloseEvent.connect(this, &StreamSink::OnCloseEvent); in Monitor()
51 events_.erase(socket); in Monitor()
53 void Unmonitor(rtc::Socket* socket) { in Unmonitor() argument
54 socket->SignalConnectEvent.disconnect(this); in Unmonitor()
[all …]
/external/swiftshader/src/System/
DSocket.cpp15 #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 …]
/external/okhttp/okio/okio/src/test/java/okio/
DSocketTimeoutTest.java23 import java.net.Socket;
33 // The size of the socket buffers to use. Less than half the data transferred during tests to
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()
[all …]
/external/cronet/net/third_party/quiche/src/quiche/quic/core/io/
Dsocket_test.cc5 #include "quiche/quic/core/io/socket.h"
31 absl::StatusOr<SocketFd> socket = socket_api::CreateSocket( in CreateTestSocket() local
34 if (socket.ok()) { in CreateTestSocket()
35 return socket.value(); in CreateTestSocket()
53 SocketFd socket = CreateTestSocket(socket_api::SocketProtocol::kUdp, in TEST() local
56 QUICHE_EXPECT_OK(socket_api::SetSocketBlocking(socket, /*blocking=*/false)); in TEST()
58 QUICHE_EXPECT_OK(socket_api::Close(socket)); in TEST()
62 SocketFd socket = CreateTestSocket(socket_api::SocketProtocol::kUdp, in TEST() local
65 QUICHE_EXPECT_OK(socket_api::SetReceiveBufferSize(socket, /*size=*/100)); in TEST()
67 QUICHE_EXPECT_OK(socket_api::Close(socket)); in TEST()
[all …]
/external/python/cpython3/Lib/test/support/
Dsocket_helper.py3 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 …]
/external/sdv/vsomeip/implementation/helper/1.66/boost/asio/
Dbasic_socket_ext_local.hpp51 /// Provides socket functionality.
69 /// The native representation of a socket.
89 * This constructor creates a socket without opening it.
91 * @param io_context The io_context object that the socket will use to
92 * dispatch handlers for any asynchronous operations performed on the socket.
101 * This constructor creates and opens a socket.
103 * @param io_context The io_context object that the socket will use to
104 * dispatch handlers for any asynchronous operations performed on the socket.
122 * This constructor creates a socket and automatically opens it bound to the
126 * @param io_context The io_context object that the socket will use to
[all …]
Dbasic_socket_ext.hpp51 /// Provides socket functionality.
69 /// The native representation of a socket.
89 * This constructor creates a socket without opening it.
91 * @param io_context The io_context object that the socket will use to
92 * dispatch handlers for any asynchronous operations performed on the socket.
101 * This constructor creates and opens a socket.
103 * @param io_context The io_context object that the socket will use to
104 * dispatch handlers for any asynchronous operations performed on the socket.
122 * This constructor creates a socket and automatically opens it bound to the
126 * @param io_context The io_context object that the socket will use to
[all …]
/external/sdv/vsomeip/implementation/helper/1.70/boost/asio/
Dbasic_socket_ext_local.hpp58 /// Provides socket functionality.
75 /// Rebinds the socket type to another executor.
79 /// The socket type when rebound to the specified executor.
83 /// The native representation of a socket.
110 * This constructor creates a socket without opening it.
112 * @param ex The I/O executor that the socket will use, by default, to
113 * dispatch handlers for any asynchronous operations performed on the socket.
122 * This constructor creates a socket without opening it.
125 * the socket will use, by default, to dispatch handlers for any asynchronous
126 * operations performed on the socket.
[all …]
Dbasic_socket_ext.hpp58 /// Provides socket functionality.
75 /// Rebinds the socket type to another executor.
79 /// The socket type when rebound to the specified executor.
83 /// The native representation of a socket.
110 * This constructor creates a socket without opening it.
112 * @param ex The I/O executor that the socket will use, by default, to
113 * dispatch handlers for any asynchronous operations performed on the socket.
122 * This constructor creates a socket without opening it.
125 * the socket will use, by default, to dispatch handlers for any asynchronous
126 * operations performed on the socket.
[all …]
/external/sdv/vsomeip/implementation/helper/1.74/boost/asio/
Dbasic_socket_ext.hpp58 /// Provides socket functionality.
75 /// Rebinds the socket type to another executor.
79 /// The socket type when rebound to the specified executor.
83 /// The native representation of a socket.
110 * This constructor creates a socket without opening it.
112 * @param ex The I/O executor that the socket will use, by default, to
113 * dispatch handlers for any asynchronous operations performed on the socket.
122 * This constructor creates a socket without opening it.
125 * the socket will use, by default, to dispatch handlers for any asynchronous
126 * operations performed on the socket.
[all …]
Dbasic_socket_ext_local.hpp58 /// Provides socket functionality.
75 /// Rebinds the socket type to another executor.
79 /// The socket type when rebound to the specified executor.
83 /// The native representation of a socket.
110 * This constructor creates a socket without opening it.
112 * @param ex The I/O executor that the socket will use, by default, to
113 * dispatch handlers for any asynchronous operations performed on the socket.
122 * This constructor creates a socket without opening it.
125 * the socket will use, by default, to dispatch handlers for any asynchronous
126 * operations performed on the socket.
[all …]
/external/sdv/vsomeip/implementation/helper/1.76/boost/asio/
Dbasic_socket_ext.hpp58 /// Provides socket functionality.
75 /// Rebinds the socket type to another executor.
79 /// The socket type when rebound to the specified executor.
83 /// The native representation of a socket.
110 * This constructor creates a socket without opening it.
112 * @param ex The I/O executor that the socket will use, by default, to
113 * dispatch handlers for any asynchronous operations performed on the socket.
122 * This constructor creates a socket without opening it.
125 * the socket will use, by default, to dispatch handlers for any asynchronous
126 * operations performed on the socket.
[all …]
Dbasic_socket_ext_local.hpp58 /// Provides socket functionality.
75 /// Rebinds the socket type to another executor.
79 /// The socket type when rebound to the specified executor.
83 /// The native representation of a socket.
110 * This constructor creates a socket without opening it.
112 * @param ex The I/O executor that the socket will use, by default, to
113 * dispatch handlers for any asynchronous operations performed on the socket.
122 * This constructor creates a socket without opening it.
125 * the socket will use, by default, to dispatch handlers for any asynchronous
126 * operations performed on the socket.
[all …]

12345678910>>...244