userver: testsuite.asyncio_socket.AsyncioSocket Class Reference
Loading...
Searching...
No Matches
testsuite.asyncio_socket.AsyncioSocket Class Reference

Detailed Description

Definition at line 15 of file asyncio_socket.py.

Public Member Functions

 __init__ (self, socket.socket sock, asyncio.AbstractEventLoop|None loop=None, timeout=DEFAULT_TIMEOUT)
 __repr__ (self)
 __enter__ (self)
 __exit__ (self, *args)
 type (self)
socket.socket socket (self)
int fileno (self)
 connect (self, address, *, timeout=_DefaultTimeout)
 sendto (self, *args, timeout=_DefaultTimeout)
 sendall (self, data, *, timeout=_DefaultTimeout)
 recv (self, size, *, timeout=_DefaultTimeout)
 recvfrom (self, *args, timeout=_DefaultTimeout)
 accept (self, *, timeout=_DefaultTimeout)
 bind (self, address)
 listen (self, *args)
 getsockname (self)
 setsockopt (self, *args, **kwargs)
 close (self)
bool has_data (self)
bool can_write (self)
 wait_for_data (self, timeout=_DefaultTimeout)

Protected Member Functions

 _with_timeout (self, awaitable, timeout)
 _sendto_legacy (self, *args, timeout)
 _recvfrom_legacy (self, *args, timeout)

Protected Attributes

asyncio.AbstractEventLoop _loop = loop
socket.socket _sock = sock
 _default_timeout = timeout

Constructor & Destructor Documentation

◆ __init__()

testsuite.asyncio_socket.AsyncioSocket.__init__ ( self,
socket.socket sock,
asyncio.AbstractEventLoop | None loop = None,
timeout = DEFAULT_TIMEOUT )

Definition at line 16 of file asyncio_socket.py.

Member Function Documentation

◆ __enter__()

testsuite.asyncio_socket.AsyncioSocket.__enter__ ( self)

Definition at line 32 of file asyncio_socket.py.

◆ __exit__()

testsuite.asyncio_socket.AsyncioSocket.__exit__ ( self,
* args )

Definition at line 35 of file asyncio_socket.py.

◆ __repr__()

testsuite.asyncio_socket.AsyncioSocket.__repr__ ( self)

Definition at line 29 of file asyncio_socket.py.

◆ _recvfrom_legacy()

testsuite.asyncio_socket.AsyncioSocket._recvfrom_legacy ( self,
* args,
timeout )
protected

Definition at line 141 of file asyncio_socket.py.

◆ _sendto_legacy()

testsuite.asyncio_socket.AsyncioSocket._sendto_legacy ( self,
* args,
timeout )
protected

Definition at line 122 of file asyncio_socket.py.

◆ _with_timeout()

testsuite.asyncio_socket.AsyncioSocket._with_timeout ( self,
awaitable,
timeout )
protected

Definition at line 115 of file asyncio_socket.py.

◆ accept()

testsuite.asyncio_socket.AsyncioSocket.accept ( self,
* ,
timeout = _DefaultTimeout )

Definition at line 81 of file asyncio_socket.py.

◆ bind()

testsuite.asyncio_socket.AsyncioSocket.bind ( self,
address )

Definition at line 86 of file asyncio_socket.py.

◆ can_write()

bool testsuite.asyncio_socket.AsyncioSocket.can_write ( self)

Definition at line 105 of file asyncio_socket.py.

◆ close()

testsuite.asyncio_socket.AsyncioSocket.close ( self)

Definition at line 98 of file asyncio_socket.py.

◆ connect()

testsuite.asyncio_socket.AsyncioSocket.connect ( self,
address,
* ,
timeout = _DefaultTimeout )

Definition at line 49 of file asyncio_socket.py.

◆ fileno()

int testsuite.asyncio_socket.AsyncioSocket.fileno ( self)

Definition at line 46 of file asyncio_socket.py.

◆ getsockname()

testsuite.asyncio_socket.AsyncioSocket.getsockname ( self)

Definition at line 92 of file asyncio_socket.py.

◆ has_data()

bool testsuite.asyncio_socket.AsyncioSocket.has_data ( self)

Definition at line 101 of file asyncio_socket.py.

◆ listen()

testsuite.asyncio_socket.AsyncioSocket.listen ( self,
* args )

Definition at line 89 of file asyncio_socket.py.

◆ recv()

testsuite.asyncio_socket.AsyncioSocket.recv ( self,
size,
* ,
timeout = _DefaultTimeout )

Definition at line 67 of file asyncio_socket.py.

◆ recvfrom()

testsuite.asyncio_socket.AsyncioSocket.recvfrom ( self,
* args,
timeout = _DefaultTimeout )

Definition at line 71 of file asyncio_socket.py.

◆ sendall()

testsuite.asyncio_socket.AsyncioSocket.sendall ( self,
data,
* ,
timeout = _DefaultTimeout )

Definition at line 63 of file asyncio_socket.py.

◆ sendto()

testsuite.asyncio_socket.AsyncioSocket.sendto ( self,
* args,
timeout = _DefaultTimeout )

Definition at line 53 of file asyncio_socket.py.

◆ setsockopt()

testsuite.asyncio_socket.AsyncioSocket.setsockopt ( self,
* args,
** kwargs )

Definition at line 95 of file asyncio_socket.py.

◆ socket()

socket.socket testsuite.asyncio_socket.AsyncioSocket.socket ( self)

Definition at line 43 of file asyncio_socket.py.

◆ type()

testsuite.asyncio_socket.AsyncioSocket.type ( self)

Definition at line 39 of file asyncio_socket.py.

◆ wait_for_data()

testsuite.asyncio_socket.AsyncioSocket.wait_for_data ( self,
timeout = _DefaultTimeout )

Definition at line 109 of file asyncio_socket.py.

Member Data Documentation

◆ _default_timeout

testsuite.asyncio_socket.AsyncioSocket._default_timeout = timeout
protected

Definition at line 26 of file asyncio_socket.py.

◆ _loop

asyncio.AbstractEventLoop testsuite.asyncio_socket.AsyncioSocket._loop = loop
protected

Definition at line 24 of file asyncio_socket.py.

◆ _sock

socket.socket testsuite.asyncio_socket.AsyncioSocket._sock = sock
protected

Definition at line 25 of file asyncio_socket.py.


The documentation for this class was generated from the following file: