Home
last modified time | relevance | path

Searched refs:_sock (Results 1 – 25 of 29) sorted by relevance

12

/external/python/cpython2/Lib/
Dsocket.py189 def __init__(self, family=AF_INET, type=SOCK_STREAM, proto=0, _sock=None): argument
190 if _sock is None:
191 _sock = _realsocket(family, type, proto)
192 self._sock = _sock
194 setattr(self, method, getattr(_sock, method))
199 self._sock = _closedsocket()
200 dummy = self._sock._dummy
206 sock, addr = self._sock.accept()
207 return _socketobject(_sock=sock), addr
214 return _socketobject(_sock=self._sock)
[all …]
Dssl.py575 socket.__init__(self, _sock=sock._sock)
610 self._sslobj = self._context._wrap_socket(self._sock, server_side,
736 return self._sock.send(data, flags)
744 return self._sock.sendto(data, flags_or_addr)
746 return self._sock.sendto(data, flags_or_addr, addr)
774 return self._sock.recv(buflen, flags)
789 return self._sock.recv_into(buffer, nbytes, flags)
797 return self._sock.recvfrom(buflen, flags)
805 return self._sock.recvfrom_into(buffer, nbytes, flags)
863 … self._sslobj = self.context._wrap_socket(self._sock, False, self.server_hostname, ssl_sock=self)
[all …]
DCGIHTTPServer.py282 while select.select([self.rfile._sock], [], [], 0)[0]:
283 if not self.rfile._sock.recv(1):
/external/libnl/python/netlink/
Dcore.py188 self._sock = capi.nl_socket_alloc_cb(cb._cb)
190 self._sock = capi.nl_socket_alloc()
194 if self._sock is None:
198 capi.nl_socket_free(self._sock)
205 return capi.nl_socket_get_local_port(self._sock)
209 capi.nl_socket_set_local_port(self._sock, int(value))
213 return capi.nl_socket_get_peer_port(self._sock)
217 capi.nl_socket_set_peer_port(self._sock, int(value))
221 return capi.nl_socket_get_peer_groups(self._sock)
225 capi.nl_socket_set_peer_groups(self._sock, value)
[all …]
/external/python/cpython2/Lib/test/
Dtest_urllib2net.py84 httpresponse = abused_fileobject._sock
256 self.assertIsNone(u.fp._sock.fp._sock.gettimeout())
267 self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 60)
278 self.assertIsNone(u.fp._sock.fp._sock.gettimeout())
284 self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 120)
292 self.assertIsNone(u.fp.fp._sock.gettimeout())
302 self.assertEqual(u.fp.fp._sock.gettimeout(), 60)
312 self.assertIsNone(u.fp.fp._sock.gettimeout())
317 self.assertEqual(u.fp.fp._sock.gettimeout(), 60)
Dtest_socket.py279 s = socket.socket()._sock
1241 self._sock = sock
1245 n = self._sock.send(data, flags)
1250 self._sock.sendall(data, flags)
1254 return getattr(self._sock, attr)
1261 self.serv_file._sock = self.SocketMemo(self.serv_file._sock)
1282 self.assertEqual(self.serv_file._sock.getsent(), [msg1, msg2, msg3])
Dssl_servers.py95 sock = self.rfile.raw._sock
/external/autotest/client/deps/lansim/src/py/
Dtuntap.py118 self._sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
129 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFMTU,
136 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFFLAGS,
143 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFFLAGS,
154 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFADDR,
170 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFADDR,
177 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFNETMASK,
187 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFHWADDR,
202 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFHWADDR,
Dsimulator_unittest.py35 self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
36 self._sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
37 self._sock.bind((host, port))
38 self._sock.listen(1)
45 rlist, wlist, xlist = select.select([self._sock], [], [], 1.)
46 if self._sock in rlist:
47 conn, (addr, port) = self._sock.accept()
51 self._sock.close()
/external/python/cpython3/Lib/test/test_asyncio/
Dfunctional.py191 self._sock = sock
198 self._prog(TestSocketWrapper(self._sock))
213 self._sock = sock
235 with self._sock:
236 self._sock.setblocking(0)
248 [self._sock, self._s1], [], [], self._timeout)
253 if self._sock in r:
255 conn, addr = self._sock.accept()
281 return self._sock.getsockname()
/external/python/cpython3/Lib/test/
Dtest_urllib2net.py266 self.assertIsNone(u.fp.raw._sock.gettimeout())
278 self.assertEqual(u.fp.raw._sock.gettimeout(), 60)
290 self.assertIsNone(u.fp.raw._sock.gettimeout())
297 self.assertEqual(u.fp.raw._sock.gettimeout(), 120)
307 self.assertIsNone(u.fp.fp.raw._sock.gettimeout())
319 self.assertEqual(u.fp.fp.raw._sock.gettimeout(), 60)
331 self.assertIsNone(u.fp.fp.raw._sock.gettimeout())
338 self.assertEqual(u.fp.fp.raw._sock.gettimeout(), 60)
Dssl_servers.py94 sock = self.rfile.raw._sock
/external/python/cpython3/Lib/asyncio/
Dselector_events.py539 return await self.sock_sendfile(transp._sock, file, offset, count,
576 _sock = None variable in _SelectorTransport
587 self._sock = sock
603 if self._sock is None:
653 if self._sock is not None:
656 self._sock.close()
689 self._sock.close()
690 self._sock = None
725 base_events._set_nodelay(self._sock)
780 nbytes = self._sock.recv_into(buf)
[all …]
Dproactor_events.py32 self._sock = sock
52 if self._sock is None:
56 if self._sock is not None:
92 if self._sock is not None:
140 if hasattr(self._sock, 'shutdown'):
141 self._sock.shutdown(socket.SHUT_RDWR)
142 self._sock.close()
143 self._sock = None
274 self._read_fut = self._loop._proactor.recv(self._sock, 32768)
362 self._sock.shutdown(socket.SHUT_WR)
[all …]
/external/curl/tests/python_dependencies/impacket/
Dnmb.py714 self._sock = sock
716 self._sock = self._setup_connection((remote_host, sess_port))
737 self._sock.close()
740 return self._sock
800 self._sock.connect(self.peer)
804 p['SourceIP'] = self._sock.getsockname()[0]
809 self._sock.sendto(str(p), self.peer)
810 self._sock.close()
812 self._sock = self._setup_connection(self.peer)
823 data, peer = self._sock.recvfrom(8192)
[all …]
/external/autotest/client/cros/netprotos/
Dzeroconf.py90 self._sock = host.socket(socket.AF_INET, socket.SOCK_DGRAM)
91 self._sock.listen(MDNS_IP_ADDR, MDNS_PORT, self._mdns_request)
98 self._sock.close()
226 self._sock.send(str(resp_dns), MDNS_IP_ADDR, MDNS_PORT)
465 self._sock.send(str(mdns), MDNS_IP_ADDR, MDNS_PORT)
/external/python/cpython2/Lib/multiprocessing/
Dreduction.py184 s = socket.socket(_sock=s)
193 _sock = fromfd(fd, family, type_, proto)
195 return _sock
/external/python/cpython3/Lib/
Dsocket.py567 self._sock = sock
589 return self._sock.recv_into(b)
607 return self._sock.send(b)
639 return self._sock.fileno()
659 self._sock._decref_socketios()
660 self._sock = None
Dsocketserver.py793 self._sock = sock
799 self._sock.sendall(b)
804 return self._sock.fileno()
/external/libnl/python/netlink/route/
Dlink.py381 return capi.rtnl_link_enslave(sock._sock, self._rtnl_link, slave._rtnl_link)
387 return capi.rtnl_link_release(sock._sock, self._rtnl_link, slave._rtnl_link)
396 ret = capi.rtnl_link_add(sock._sock, self._rtnl_link, flags)
407 ret = capi.rtnl_link_change(sock._sock, self._orig, self._rtnl_link, flags)
416 ret = capi.rtnl_link_delete(sock._sock, self._rtnl_link)
541 link = capi.get_from_kernel(sock._sock, 0, name)
Daddress.py317 ret = capi.rtnl_addr_add(socket._sock, self._rtnl_addr, flags)
323 ret = capi.rtnl_addr_delete(socket._sock, self._rtnl_addr, flags)
/external/python/httplib2/tests/
D__init__.py51 self._sock = sock
53 self._sock = None
61 if self._sock is None:
64 chunk = self._sock.recv(8 << 10)
/external/python/httplib2/python3/httplib2/
Dsocks.py153 self, family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0, _sock=None argument
155 _orgsocket.__init__(self, family, type, proto, _sock)
/external/python/httplib2/python2/httplib2/
Dsocks.py153 self, family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0, _sock=None argument
155 _orgsocket.__init__(self, family, type, proto, _sock)
/external/python/cpython3/Lib/http/
Dserver.py1203 while select.select([self.rfile._sock], [], [], 0)[0]:
1204 if not self.rfile._sock.recv(1):

12