numeric func
Execute a command line on the peer process to which the channel is connected.
The channel must be a peer channel. For all other channels, this function is a no-op.
Multiple commands can be separated by semi-colon characters.
The following values are returned by this function:
0 - when the command line 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(<commands> {,<sync>)
<channel>
The channel identifier.
<commands>
The text of the command line to be executed. This should be a string value.
<async>
A numeric value indicating whether the operation is to be asynchronous (value 1) or synchronous (value 0).
If omitted, 0 is assumed.
Synchronous means that the function will wait until the peer process has
executed the command line. Asynchronous means that the function will not wait, but continue as soon as
the peer has received the command line.
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.
Open a channel to a peer, whose network socket is known, and execute a macro. The network socket of the current process is also passed to the peer, in case the peer wants to communicate back in an equivalent fashion. We are not interested in waiting for a reply, so the function passes the <async> parameter as 1.
open ch,-peer='localhost:65132',-tim=5 unless (err) { ch.command('exec c:/files/update.cmd(network_socket)',1) ch.close }
Commands: |
|
Identifiers: |
chan# (channel) |
Structures: |