/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/ccbench/ |
ccbench.py | 273 def _sendto(sock, s, addr):
274 sock.sendto(s.encode('ascii'), addr)
276 def _recv(sock, n):
277 return sock.recv(n).decode('ascii')
280 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
284 _sendto(sock, "%r\n" % _time(), addr)
292 _sendto(sock, LAT_END + "\n", addr)
303 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
304 sock.bind(("127.0.0.1", 0))
305 addr = sock.getsockname() [all...] |
/external/python/cpython2/Tools/ccbench/ |
ccbench.py | 273 def _sendto(sock, s, addr): 274 sock.sendto(s.encode('ascii'), addr) 276 def _recv(sock, n): 277 return sock.recv(n).decode('ascii') 280 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 284 _sendto(sock, "%r\n" % _time(), addr) 292 _sendto(sock, LAT_END + "\n", addr) 303 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 304 sock.bind(("127.0.0.1", 0)) 305 addr = sock.getsockname( [all...] |
/external/python/cpython3/Lib/test/test_asyncio/ |
test_proactor_events.py | 33 self.sock = mock.Mock(socket.socket) 36 transport = _ProactorSocketTransport(self.loop, self.sock, 47 self.proactor.recv.assert_called_with(self.sock, 4096) 52 self.loop._proactor.recv.assert_called_with(self.sock, 4096) 63 self.loop._proactor.recv.assert_called_with(self.sock, 4096) 152 self.loop._proactor.send.assert_called_with(self.sock, b'data') 272 self.assertTrue(self.sock.close.called) 278 self.sock.shutdown.assert_called_with(socket.SHUT_WR) 280 self.assertEqual(self.sock.shutdown.call_count, 1) 290 self.assertFalse(self.sock.shutdown.called [all...] |
/external/libnl/src/ |
nl-addr-delete.c | 15 static struct nl_sock *sock; variable in typeref:struct:nl_sock 59 if ((err = rtnl_addr_delete(sock, addr, 0)) < 0) 76 sock = nl_cli_alloc_socket(); 77 nl_cli_connect(sock, NETLINK_ROUTE); 78 link_cache = nl_cli_link_alloc_cache(sock); 79 addr_cache = nl_cli_addr_alloc_cache(sock);
|
nl-class-delete.c | 17 static struct nl_sock *sock; variable in typeref:struct:nl_sock 57 if ((err = rtnl_class_delete(sock, class)) < 0) 74 sock = nl_cli_alloc_socket(); 75 nl_cli_connect(sock, NETLINK_ROUTE); 76 link_cache = nl_cli_link_alloc_cache(sock); 120 class_cache = nl_cli_class_alloc_cache(sock, rtnl_tc_get_ifindex(tc));
|
nl-cls-delete.c | 17 static struct nl_sock *sock; variable in typeref:struct:nl_sock 59 if ((err = rtnl_cls_delete(sock, cls, 0)) < 0) 76 cache = nl_cli_cls_alloc_cache(sock, ifindex, parent); 95 sock = nl_cli_alloc_socket(); 96 nl_cli_connect(sock, NETLINK_ROUTE); 97 link_cache = nl_cli_link_alloc_cache(sock);
|
nl-neigh-delete.c | 17 static struct nl_sock *sock; variable in typeref:struct:nl_sock 54 if ((err = rtnl_neigh_delete(sock, neigh, 0)) < 0) 71 sock = nl_cli_alloc_socket(); 72 nl_cli_connect(sock, NETLINK_ROUTE); 73 link_cache = nl_cli_link_alloc_cache(sock); 74 neigh_cache = nl_cli_neigh_alloc_cache(sock);
|
nl-qdisc-delete.c | 18 static struct nl_sock *sock; variable in typeref:struct:nl_sock 57 if ((err = rtnl_qdisc_delete(sock, qdisc)) < 0) 75 sock = nl_cli_alloc_socket(); 76 nl_cli_connect(sock, NETLINK_ROUTE); 77 link_cache = nl_cli_link_alloc_cache(sock); 78 qdisc_cache = nl_cli_qdisc_alloc_cache(sock);
|
nl-route-add.c | 54 struct nl_sock *sock; local 62 sock = nl_cli_alloc_socket(); 63 nl_cli_connect(sock, NETLINK_ROUTE); 64 link_cache = nl_cli_link_alloc_cache(sock); 65 route_cache = nl_cli_route_alloc_cache(sock, 0); 123 if ((err = rtnl_route_add(sock, route, NLM_F_EXCL)) < 0)
|
/external/python/cpython2/Lib/test/ |
test_telnetlib.py | 47 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 48 self.sock.settimeout(60) # Safety net. Look issue 11812 49 self.port = test_support.bind_port(self.sock) 50 self.thread = threading.Thread(target=server, args=(self.evt,self.sock)) 61 telnet.sock.close() 70 self.assertEqual(telnet.sock.gettimeout(), 30) 71 telnet.sock.close() 81 self.assertTrue(telnet.sock.gettimeout() is None) 82 telnet.sock.close() 86 self.assertEqual(telnet.sock.gettimeout(), 30 [all...] |
/external/toybox/toys/other/ |
nbd_client.c | 42 int sock = -1, nbd, flags; local 55 sock = xconnect(xgetaddrinfo(host, port, AF_UNSPEC, SOCK_STREAM, 0, 0)); 57 setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &temp, sizeof(int)); 61 xreadall(sock, toybuf, 152); 77 if (ioctl(nbd, NBD_SET_SOCK, sock) < 0) break; 107 close(sock);
|
/external/v8/tools/testrunner/server/ |
status_handler.py | 37 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 38 code = sock.connect_ex((peer.address, constants.STATUS_PORT)) 42 compression.Send(query, sock) 43 compression.Send(constants.END_OF_STREAM, sock) 44 rec = compression.Receiver(sock) 51 sock.close()
|
/system/core/libcutils/ |
sockets_unix.cpp | 67 int socket_close(int sock) { 68 return close(sock); 71 int socket_set_receive_timeout(cutils_socket_t sock, int timeout_ms) { 75 return setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); 78 ssize_t socket_send_buffers(cutils_socket_t sock, 94 return writev(sock, iovec_buffers, num_buffers);
|
sockets_windows.cpp | 53 int socket_close(cutils_socket_t sock) { 54 return closesocket(sock); 57 int socket_set_receive_timeout(cutils_socket_t sock, int timeout_ms) { 58 return setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, 62 ssize_t socket_send_buffers(cutils_socket_t sock, 80 if (WSASend(sock, wsa_buffers, num_buffers, &bytes_sent, 0, nullptr,
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/ |
test_ftplib.py | 107 sock = socket.socket()
108 sock.bind((self.socket.getsockname()[0], 0))
109 sock.listen(5)
110 sock.settimeout(10)
111 ip, port = sock.getsockname()[:2]
115 conn, addr = sock.accept()
126 sock = socket.socket(socket.AF_INET6)
127 sock.bind((self.socket.getsockname()[0], 0))
128 sock.listen(5)
129 sock.settimeout(10) [all...] |
/prebuilts/gdb/darwin-x86/lib/python2.7/test/ |
test_ftplib.py | 107 sock = socket.socket() 108 sock.bind((self.socket.getsockname()[0], 0)) 109 sock.listen(5) 110 sock.settimeout(10) 111 ip, port = sock.getsockname()[:2] 115 conn, addr = sock.accept() 126 sock = socket.socket(socket.AF_INET6) 127 sock.bind((self.socket.getsockname()[0], 0)) 128 sock.listen(5) 129 sock.settimeout(10 [all...] |
/prebuilts/gdb/linux-x86/lib/python2.7/test/ |
test_ftplib.py | 107 sock = socket.socket() 108 sock.bind((self.socket.getsockname()[0], 0)) 109 sock.listen(5) 110 sock.settimeout(10) 111 ip, port = sock.getsockname()[:2] 115 conn, addr = sock.accept() 126 sock = socket.socket(socket.AF_INET6) 127 sock.bind((self.socket.getsockname()[0], 0)) 128 sock.listen(5) 129 sock.settimeout(10 [all...] |
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/test/ |
test_ftplib.py | 107 sock = socket.socket() 108 sock.bind((self.socket.getsockname()[0], 0)) 109 sock.listen(5) 110 sock.settimeout(10) 111 ip, port = sock.getsockname()[:2] 115 conn, addr = sock.accept() 126 sock = socket.socket(socket.AF_INET6) 127 sock.bind((self.socket.getsockname()[0], 0)) 128 sock.listen(5) 129 sock.settimeout(10 [all...] |
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/test/ |
test_ftplib.py | 107 sock = socket.socket() 108 sock.bind((self.socket.getsockname()[0], 0)) 109 sock.listen(5) 110 sock.settimeout(10) 111 ip, port = sock.getsockname()[:2] 115 conn, addr = sock.accept() 126 sock = socket.socket(socket.AF_INET6) 127 sock.bind((self.socket.getsockname()[0], 0)) 128 sock.listen(5) 129 sock.settimeout(10 [all...] |
/external/autotest/client/cros/netprotos/ |
fake_host.py | 26 sock = FakeSocket(self, family, sock_type) 27 self._sockets.append(sock) 28 return sock
|
zeroconf_unittest.py | 79 sock = self._host._sockets[0] 81 self.assertEqual(sock._family, socket.AF_INET) # IPv4 82 self.assertEqual(sock._sock_type, socket.SOCK_DGRAM) # UDP 85 self.assertTrue(sock._bound) 86 self.assertEqual(sock._bind_ip_addr, '224.0.0.251') # mDNS address 87 self.assertEqual(sock._bind_port, 5353) # mDNS port 88 self.assertTrue(callable(sock._bind_recv_callback)) 139 sock = self._host._sockets[0] 140 cbk = sock._bind_recv_callback
|
/external/ltp/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_svctcp_create/ |
rpc_svctcp_create.c | 47 int sock = 600; local 51 sock = socket(AF_UNIX, SOCK_DGRAM, IPPROTO_TCP); 52 svcr = svctcp_create(sock, 0, 0);
|
/external/ltp/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_svcudp_create/ |
rpc_svcudp_create.c | 47 int sock = 600; local 52 sock = socket(AF_UNIX, SOCK_SEQPACKET, IPPROTO_UDP); 53 svcr = svcudp_create(sock);
|
/external/python/cpython3/Lib/test/ |
test_urllib_response.py | 11 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 12 self.fp = self.sock.makefile('rb') 56 self.sock.close()
|
/external/autotest/client/cros/crash/crasher/ |
crasher.cc | 52 } sock; local 54 if (sock.fd == -1) { 62 if (connect(sock.fd, address_ptr, sizeof(address)) == -1) { 71 if (sendmsg(sock.fd, &msg, 0) == -1) {
|