Lines Matching refs:sock
28 def _set_socket_extra(transport, sock):
29 transport._extra['socket'] = trsock.TransportSocket(sock)
32 transport._extra['sockname'] = sock.getsockname()
36 "getsockname() failed on %r", sock, exc_info=True)
40 transport._extra['peername'] = sock.getpeername()
50 def __init__(self, loop, sock, protocol, waiter=None,
53 self._set_extra(sock)
54 self._sock = sock
91 def _set_extra(self, sock):
92 self._extra['pipe'] = sock
185 def __init__(self, loop, sock, protocol, waiter=None,
189 super().__init__(loop, sock, protocol, waiter, extra, server)
462 def __init__(self, loop, sock, protocol, address=None,
469 super().__init__(loop, sock, protocol, waiter=waiter, extra=extra)
475 def _set_extra(self, sock):
476 _set_socket_extra(self, sock)
610 def __init__(self, loop, sock, protocol, waiter=None,
612 super().__init__(loop, sock, protocol, waiter, extra, server)
613 base_events._set_nodelay(sock)
615 def _set_extra(self, sock):
616 _set_socket_extra(self, sock)
644 def _make_socket_transport(self, sock, protocol, waiter=None,
646 return _ProactorSocketTransport(self, sock, protocol, waiter,
664 def _make_datagram_transport(self, sock, protocol,
666 return _ProactorDatagramTransport(self, sock, protocol, address,
669 def _make_duplex_pipe_transport(self, sock, protocol, waiter=None,
672 sock, protocol, waiter, extra)
674 def _make_read_pipe_transport(self, sock, protocol, waiter=None,
676 return _ProactorReadPipeTransport(self, sock, protocol, waiter, extra)
678 def _make_write_pipe_transport(self, sock, protocol, waiter=None,
682 sock, protocol, waiter, extra)
704 async def sock_recv(self, sock, n):
705 return await self._proactor.recv(sock, n)
707 async def sock_recv_into(self, sock, buf):
708 return await self._proactor.recv_into(sock, buf)
710 async def sock_recvfrom(self, sock, bufsize):
711 return await self._proactor.recvfrom(sock, bufsize)
713 async def sock_recvfrom_into(self, sock, buf, nbytes=0):
717 return await self._proactor.recvfrom_into(sock, buf, nbytes)
719 async def sock_sendall(self, sock, data):
720 return await self._proactor.send(sock, data)
722 async def sock_sendto(self, sock, data, address):
723 return await self._proactor.sendto(sock, data, 0, address)
725 async def sock_connect(self, sock, address):
726 return await self._proactor.connect(sock, address)
728 async def sock_accept(self, sock):
729 return await self._proactor.accept(sock)
731 async def _sock_sendfile_native(self, sock, file, offset, count):
753 await self._proactor.sendfile(sock, file, offset, blocksize)
835 def _start_serving(self, protocol_factory, sock,
860 f = self._proactor.accept(sock)
862 if sock.fileno() != -1:
866 'socket': trsock.TransportSocket(sock),
868 sock.close()
871 sock, exc_info=True)
873 sock.close()
875 self._accept_futures[sock.fileno()] = f
889 def _stop_serving(self, sock):
890 future = self._accept_futures.pop(sock.fileno(), None)
893 self._proactor._stop_serving(sock)
894 sock.close()