|
Peach ::
publisher ::
Publisher ::
Class Publisher
|
|
Class Publisher
source code
The Publisher object(s) implement a way to send and/or receave data by
some means. This could be a TCP connection, a filehandle, or SQL,
etc.
There are two "types" of publishers, stream based and call
based. This base class supports both types.
To support stream based publishing implement everything but
"call".
To support call based publishing implement start, stop, and call.
Note: A publisher can support both stream and call based
publishing.
|
|
|
|
|
|
|
|
|
|
string
|
|
|
string
|
|
|
|
|
|
|
|
|
|
close(self)
Close current stream/connection. |
source code
|
|
|
Change state such that send/receave will work. For Tcp this could be
connecting to a remote host
|
|
Change state such that send/receave will not work. For Tcp this could
be closing a connection, for a file it might be closing the file
handle.
|
|
Publish some data
- Parameters:
data (string) - Data to publish
|
|
Receive some data.
- Parameters:
size (integer) - Number of bytes to return
- Returns: string
- data received
|
|
Call a method using arguments.
- Parameters:
method (string) - Method to call
args (Array) - Array of strings as arguments
- Returns: string
- data returned (if any)
|
|
Get or set property
- Parameters:
property (string) - Name of method to invoke
value (object) - Value to set. If None, return property instead
|
|
Accept incoming connection. Blocks until incoming connection
occurs.
|