string func
Evaluate a function on the peer process to which the channel is connected.
The value returned by this function will be an array of strings returned
as a rsult of executing the function on the peer.
The channel must be a peer channel. For all other channels, this function is a no-op.
The following values are returned by this function:
0 - when the evaluation text was received by the peer and processed (successfully or otherwise),
-1 - when a communication error has occurred.
The code of the function cannot be redefined.
<channel>.command(<expression> {,<sync>)
<channel>
The channel identifier.
<expression>
The text of the expression to be evaluated. This should be a string value.
The evaluation will be done synchronously, waiting until the peer has finished.
The channel timeout will be used by this function. If the peer process has not responded within the timeout period, an error will be recorded.
If execution of the expression on the peer yields values other than string values, they will be converted to strings.
Open a channel to a peer, whose network socket is known, and evaluate a simple expression to get the time that the peer process started.
open ch,-peer='localhost:64346',-tim=5 unless (err) { # Although .evaluate returns a string, we can assign strings directly to time identifiers time t = ch.evaluate('session_start') ch.close }
Commands: |
|
Identifiers: |
chan# (channel) |
Structures: |