The consoles
module is an obsolete module, meant to give Orchids the possibility to print messages on so-called consoles, namely, on remote machines.
This is an extension module, whose sole purpose is to add new primitives to the Orchids language.
The reasons it is obsolete are:
- The
AddConsole
configuration option forces Orchids to open a connection to some remote machine, and if that machine does not respond (in particular, if you happen to have no network connection) then Orchids will just sit idle for a few minutes, not detecting any event, with no warning—this is very bad. - Connections to remote machines are not secure: not authenticated, not private, nothing (not even reliable).
- The module served no purpose in practice.
Configuration options
<module consoles>
AddConsole
console-name host-name udp-port: define a new console, whose name is console-name. This name will have to be passed as first argument toconsole_msg
or toconsole_evt
. Printing a string on this console will send a UDP packet containing just that string over port udp-port to machine host-name.
Examples:
AddConsole alert "localhost" 42000 AddConsole warning "localhost" 42001 AddConsole info "localhost" 42002
</module>
Primitives
console_msg
:str
,str
→int
print a string on the named console- usage:
console_msg
(console-name, string) - returns: 1 (true) if console was found, 0 (false) otherwise
- usage:
console_evt
:str
,event
→int
print an event on the named console- usage:
console_evt
(console-name, event) - returns: 1 (true) if console was found, 0 (false) otherwise
- usage: