Home
last modified time | relevance | path

Searched refs:socket (Results 1 – 25 of 41) sorted by relevance

12

/tools/test/connectivity/acts/framework/acts/controllers/utils_lib/
Dhost_utils.py15 import socket
31 port = _try_bind(0, socket.SOCK_STREAM, socket.IPPROTO_TCP)
33 if port and _try_bind(port, socket.SOCK_DGRAM, socket.IPPROTO_UDP):
46 return (_try_bind(port, socket.SOCK_STREAM, socket.IPPROTO_TCP) and
47 _try_bind(port, socket.SOCK_DGRAM, socket.IPPROTO_UDP))
51 s = socket.socket(socket.AF_INET, socket_type, socket_proto)
58 except socket.error:
/tools/test/connectivity/acts_tests/tests/google/bt/power/
DSetupBTPairingTest.py25 import socket
49 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
50 sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
60 except socket.timeout:
62 except socket.error:
68 sock.shutdown(socket.SHUT_RDWR)
/tools/test/connectivity/acts/framework/tests/
Dacts_host_utils_test.py17 import socket
29 test_s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
38 test_s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
/tools/test/connectivity/acts_tests/tests/google/wifi/
DSetupWifiNetworkTest.py18 import socket
34 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
35 sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
45 except socket.timeout:
47 except socket.error:
51 sock.shutdown(socket.SHUT_RDWR)
DWifiTetheringTest.py18 import socket
84 socket.inet_pton(socket.AF_INET6, ip_address)
86 except socket.error:
256 socket = sutils.open_datagram_socket(ad, local_ip, port)
258 ad, ad, socket, socket, remote_ip, port)
259 sutils.close_datagram_socket(ad, socket)
/tools/test/connectivity/acts/framework/tests/controllers/rohdeschwarz_lib/
Dcontest_test.py21 import socket
36 with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s:
38 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
81 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
/tools/test/connectivity/acts/framework/acts/controllers/sl4a_lib/
Dsl4a_session.py16 import socket
196 client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
198 client_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
201 client_socket.bind((socket.gethostname(), ports.client_port))
216 except socket.timeout:
220 except socket.error as e:
/tools/test/connectivity/acts_tests/acts_contrib/test_utils/net/
Dipsec_test_utils.py148 def apply_transport_mode_transforms_datagram_socket(ad, socket, transforms): argument
157 socket, cconst.DIRECTION_IN, transforms[0])
159 socket, cconst.DIRECTION_OUT, transforms[1])
166 def remove_transport_mode_transforms_datagram_socket(ad, socket): argument
173 status = ad.droid.ipSecRemoveTransportModeTransformsDatagramSocket(socket)
176 def apply_transport_mode_transforms_socket(ad, socket, transforms): argument
185 socket, cconst.DIRECTION_IN, transforms[0])
187 socket, cconst.DIRECTION_OUT, transforms[1])
194 def remove_transport_mode_transforms_socket(ad, socket): argument
201 status = ad.droid.ipSecRemoveTransportModeTransformsSocket(socket)
Dsocket_test_utils.py241 def close_socket(ad, socket): argument
248 status = ad.droid.closeTcpSocket(socket)
251 def close_server_socket(ad, socket): argument
258 status = ad.droid.closeTcpServerSocket(socket)
261 def shutdown_socket(ad, socket): argument
268 fd = ad.droid.getFileDescriptorOfSocket(socket)
Dconnectivity_test_utils.py59 def start_tcp_socket_keepalive(ad, socket, time_interval = 10): argument
68 key = ad.droid.startTcpSocketKeepalive(socket, time_interval)
/tools/test/connectivity/acts/framework/tests/controllers/sl4a_lib/
Dsl4a_session_test.py18 from socket import timeout
19 from socket import error as socket_error
83 with mock.patch('socket.socket') as socket:
90 socket.return_value = socket_instance
109 with mock.patch('socket.socket') as socket:
114 socket.return_value = socket_instance
130 with mock.patch('socket.socket') as socket:
135 socket.return_value = socket_instance
157 with mock.patch('socket.socket') as socket:
162 socket.return_value = socket_instance
/tools/test/connectivity/acts/framework/acts/controllers/
Dabstract_inst.py18 import socket
74 self._socket = socket.create_connection(
81 except socket.timeout:
86 except socket.error:
109 except socket.timeout:
115 except socket.error:
148 except socket.timeout:
153 except socket.error:
177 self._socket.shutdown(socket.SHUT_RDWR)
Dpacket_sender.py21 import socket
182 except socket.error as excpt:
204 except socket.error as excpt:
455 ndst_ip = socket.inet_pton(socket.AF_INET6, target_ip6)
457 node_mcast = socket.inet_ntop(socket.AF_INET6, nnode_mcast)
/tools/test/connectivity/acts/framework/tests/controllers/
Dabstract_inst_test.py18 import socket
41 mock_connect.side_effect = socket.timeout
51 mock_connect.side_effect = socket.error
73 test_inst._socket.sendall.side_effect = socket.timeout
83 test_inst._socket.sendall.side_effect = socket.error
104 test_inst._socket.recv.side_effect = socket.timeout
114 test_inst._socket.recv.side_effect = socket.error
128 mock_connect.return_value.shutdown.assert_called_with(socket.SHUT_RDWR)
/tools/test/connectivity/acts/framework/acts/controllers/anritsu_lib/
Dmg3710a.py22 import socket
59 self._sock = socket.create_connection(
65 except socket.timeout:
68 except socket.error:
101 except socket.timeout:
103 except socket.error:
125 except socket.timeout:
127 except socket.error:
/tools/treble/hacksaw/scripts/
Dinstall-service.sh14 cp ${SCRIPT_DIR}/hacksaw.socket /lib/systemd/system/hacksaw.socket
17 systemctl enable hacksaw.socket
21 systemctl start hacksaw.socket
Duninstall-service.sh9 systemctl stop hacksaw.socket
12 systemctl disable hacksaw.socket
14 rm /lib/systemd/system/hacksaw.socket
/tools/acloud/internal/lib/
Dutils.py32 import socket
779 tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
795 tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
798 except socket.error as port_error:
Demulator_console.py21 import socket
73 self._socket = socket.create_connection(
100 self._socket = socket.create_connection(
/tools/asuite/atest-py2/test_runners/
Datest_tf_test_runner.py25 import socket
273 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
274 server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
/tools/test/connectivity/acts/framework/acts/
Dutils.py32 import socket
1361 socket.inet_pton(socket.AF_INET, address)
1364 socket.inet_aton(address)
1365 except socket.error:
1368 except socket.error: # not a valid address
1378 socket.inet_pton(socket.AF_INET6, address)
1379 except socket.error: # not a valid address
1781 if addr.family == socket.AF_INET6 and ipaddress.ip_address(
/tools/asuite/atest/test_runners/
Datest_tf_test_runner.py28 import socket
394 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
395 server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
/tools/asuite/atest/logstorage/
Datest_gcp_utils.py42 from socket import socket
160 with socket() as local_socket:
/tools/test/connectivity/acts/framework/acts/controllers/fuchsia_lib/
Dutils_lib.py22 import socket
82 paramiko.ssh_exception.AuthenticationException, socket.timeout,
83 socket.error, ConnectionRefusedError, ConnectionResetError),
/tools/asuite/atest-py2/metrics/
Dmetrics_base.py23 import socket
76 hostname = socket.getfqdn()

12