Module pprocess :: Class PersistentChannel
[hide private]
[frames] | no frames]

Class PersistentChannel

source code

Channel --+
          |
         PersistentChannel


A persistent communications channel which can handle peer disconnection,
acting as a server, meaning that this channel is associated with a specific
address which can be contacted by other processes.

Instance Methods [hide private]
 
__init__(self, pid, endpoint, address)
Initialise the channel with a process identifier 'pid', a 'read_pipe' from which messages will be received, and a 'write_pipe' into which messages will be sent.
source code
 
close(self)
Close the persistent channel and remove the socket file.
source code
 
_ensure_pipes(self)
Ensure that the channel is capable of communicating.
source code
 
_reset_pipes(self)
Discard the existing connection.
source code
 
_ensure_communication(self, timeout=None)
Ensure that sending and receiving are possible.
source code
 
_send(self, obj)
Send the given object 'obj' through the channel.
source code
 
_receive(self)
Receive an object through the channel, returning the object.
source code

Inherited from Channel: __del__, receive, send, wait

Method Details [hide private]

__init__(self, pid, endpoint, address)
(Constructor)

source code 

Initialise the channel with a process identifier 'pid', a 'read_pipe'
from which messages will be received, and a 'write_pipe' into which
messages will be sent.

Overrides: Channel.__init__
(inherited documentation)

close(self)

source code 
Close the persistent channel and remove the socket file.

Overrides: Channel.close

_send(self, obj)

source code 
Send the given object 'obj' through the channel.

Overrides: Channel._send

_receive(self)

source code 
Receive an object through the channel, returning the object.

Overrides: Channel._receive