Package ClusterShell :: Package Worker :: Module EngineClient :: Class EngineClientStream
[hide private]
[frames] | no frames]

Class EngineClientStream

source code


EngineClient I/O stream object.

Internal object used by EngineClient to manage its Engine-registered I/O streams. Each EngineClientStream is bound to a file object (file descriptor). It can be either an input, an output or a bidirectional stream (not used for now).

Instance Methods [hide private]
 
__init__(self, name, sfile=None, evmask=0)
Initialize an EngineClientStream object.
source code
 
set_file(self, sfile, evmask=0, retain=True, closefd=True)
Set the stream file and event mask for this object.
source code
 
__repr__(self)
repr(x)
source code
 
close(self)
Close stream.
source code
 
readable(self)
Return whether the stream is setup as readable.
source code
 
writable(self)
Return whether the stream is setup as writable.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, sfile=None, evmask=0)
(Constructor)

source code 

Initialize an EngineClientStream object.

Parameters:
  • name - Name of stream.
  • sfile - File object or file descriptor.
  • evmask - Config I/O event bitmask.
Overrides: object.__init__

set_file(self, sfile, evmask=0, retain=True, closefd=True)

source code 

Set the stream file and event mask for this object. sfile should be a file object or a file descriptor. Event mask can be either E_READ, E_WRITE or both. Currently does NOT retain file object.

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)