Constructor

Class: cogen.core.sockets.Read

len is max read size, BUT, if if there are buffers from ReadLine return them first. Example usage:

yield sockets.Read(socket_object, buffer_length)

Constructor

__init__ (self, sock, len=4096, **kws)

Methods

cleanup (self, sched, coro)

finalize (self)

iocp (self, overlap)

iocp_done (self, rc, nbytes)

pending (self)

process (self, sched, coro)

Add the operation in the reactor if necessary.

run (self, reactor)

try_run (self, reactor)

This method will return a None value or raise a exception if the operation can't complete at this time.

The socket poller will run this method if the socket is readable/writeable.

If this returns a value that evaluates to False, the poller will try to run this at a later time (when the socket is readable/writeable again).

Attributes

addr

Value of addr

<member 'addr' of 'SocketOperation' objects>

buff

Value of buff

<member 'buff' of 'SocketOperation' objects>

fileno

Value of fileno

<member 'fileno' of 'SocketOperation' objects>

iocp_buff

Value of iocp_buff

<member 'iocp_buff' of 'ReadOperation' objects>

last_update

Value of last_update

<member 'last_update' of 'SocketOperation' objects>

len

Value of len

<member 'len' of 'SocketOperation' objects>

prio

Value of prio

<member 'prio' of 'Operation' objects>

run_first

Value of run_first

<member 'run_first' of 'SocketOperation' objects>

sock

Value of sock

<member 'sock' of 'SocketOperation' objects>

state

Value of state

<member 'state' of 'Operation' objects>

temp_buff

Value of temp_buff

<member 'temp_buff' of 'ReadOperation' objects>

trim

Value of trim

2000

weak_timeout

Value of weak_timeout

<member 'weak_timeout' of 'TimedOperation' objects>