pyre.ipc¶
Submodules¶
Package Contents¶
-
class
pyre.ipc.foundry(factory, implements=None, tip='', **kwds)¶ A decorator for callables that return component classes
-
pyre_tip=¶
-
pyre_factory¶
-
pyre_implements¶
-
__call__(self, *args, **kwds)¶
-
-
pyre.ipc.pipe(descriptors=None, **kwds)¶ If {descriptors} is not {None}, it is expected to be a pair ({infd}, {outfd}) of already open file descriptors; just wrap a channel around them. Otherwise, build a pair of pipes suitable for bidirectional communication between two processes on the same host
-
pyre.ipc.tcp(address)¶ Builds a channel over a TCP connection to a server
The parameter {address} is expected to be convertible to a {pyre.schemata.inet} compatible address.
-
pyre.ipc.port(address=None)¶ Establishes a port at {address}
-
pyre.ipc.inet(spec='')¶ Convert {spec} to a {pyre.schemata.inet} address
-
class
pyre.ipc.dispatcher¶ Bases:
pyre.protocolProtocol definition for components that monitor communication channels and invoke handlers when activity is detected
-
watch(self)¶ Enter an indefinite loop of monitoring all registered event sources and invoking the registered event handlers
-
stop(self)¶ Stop monitoring all communication channels
-
alarm(self, interval, call)¶ Schedule {call} to be invoked after {interval} elapses. {interval} is expected to be a dimensional quantity from {pyre.units} with units of time
-
whenReadReady(self, channel, call)¶ Add {call} to the list of routines to call when {channel} is ready to be read
-
whenWriteReady(self, channel, call)¶ Add {call} to the list of routines to call when {channel} is ready to be written
-
whenException(self, channel, call)¶ Add {call} to the list of routines to call when something exceptional has happened to {channel}
-
-
class
pyre.ipc.marshaler¶ Bases:
pyre.protocolProtocol for components responsible for serializing python objects for transmission to other processes
-
recv(self, channel)¶ Extract and return one object from {channel}
-
send(self, item, channel)¶ Pack and ship {item} over {channel}
-
-
pyre.ipc.pickler()¶ A marshaler that uses native python services to serialize objects
-
pyre.ipc.scheduler()¶ A component that enables the construction of applications with event loops
-
pyre.ipc.selector()¶ A scheduler that can listen to file objects
-
pyre.ipc.newPickler(**kwds)¶ A marshaler that uses native python services to serialize objects
-
pyre.ipc.newScheduler(**kwds)¶ A component that enables the construction of applications with event loops
-
pyre.ipc.newSelector(**kwds)¶ A scheduler that can listen to file objects