Lines Matching refs:sock
231 ssl=None, sock=None,
251 if sock is not None:
253 'path and sock can not be specified at the same time')
256 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0)
258 sock.setblocking(False)
259 await self.sock_connect(sock, path)
261 sock.close()
265 if sock is None:
266 raise ValueError('no path and sock were specified')
267 if (sock.family != socket.AF_UNIX or
268 sock.type != socket.SOCK_STREAM):
270 f'A UNIX Domain Stream Socket was expected, got {sock!r}')
271 sock.setblocking(False)
274 sock, protocol_factory, ssl, server_hostname,
281 sock=None, backlog=100, ssl=None,
297 if sock is not None:
299 'path and sock can not be specified at the same time')
302 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
317 sock.bind(path)
319 sock.close()
328 sock.close()
331 if sock is None:
333 'path was not specified, and no sock specified')
335 if (sock.family != socket.AF_UNIX or
336 sock.type != socket.SOCK_STREAM):
338 f'A UNIX Domain Stream Socket was expected, got {sock!r}')
340 sock.setblocking(False)
341 server = base_events.Server(self, [sock], protocol_factory,
352 async def _sock_sendfile_native(self, sock, file, offset, count):
371 self._sock_sendfile_native_impl(fut, None, sock, fileno,
375 def _sock_sendfile_native_impl(self, fut, registered_fd, sock, fileno,
377 fd = sock.fileno()
398 self._sock_add_cancellation_callback(fut, sock)
400 fd, sock, fileno,
440 self._sock_add_cancellation_callback(fut, sock)
442 fd, sock, fileno,
449 def _sock_add_cancellation_callback(self, fut, sock):
452 fd = sock.fileno()