Name | Returns | Usage | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
load | undefined | load([bool background or object scope,] string filename [,args])
load and execute a JavaScript module (filename), optionally specifying a target scope object (default: this) and a list of arguments to pass to the module (as argv). Returns the result (last executed statement) of the executed script or a newly created Queue object if background is true). | Background (added in v3.12): If background is true, the loaded script runs in the background (in a child thread) but may communicate with the parent script/thread by reading from and/or writing to the parent_queue (an automatically created Queue object). The result (last executed statement) of the executed script will also be automatically written to the parent_queue which may be read later by the parent script. backslash | string | backslash(string path)
| returns directory path with trailing (platform-specific) path delimeter (i.e. "slash" or "backslash")
| file_cfgname | string | file_cfgname(string path, filename)
| returns completed configuration filename from supplied path and filename, optionally including the local hostname (e.g. path/file.host.domain.ext or path/file.host.ext) if such a variation of the filename exists
| file_mutex | boolean | file_mutex(string filename [,text])
| attempts to create an exclusive (e.g. lock) file, optionally with the contents of text
| netaddr_type | number | netaddr_type(string email_address)
| returns the proper message net_type for the specified email_address, (e.g. NET_INTERNET for Internet e-mail or NET_NONE for local e-mail)
| list_named_queues | array | list_named_queues()
| returns an array of named queues (created with the Queue constructor)
| |
Name | Type | Description |
---|---|---|
argc | number | number of arguments passed to the script |
argv | array | array of argument strings (argv.length == argc) |
errno | number | last system error number |
errno_str | string | description of last system error |
Name | Returns | Usage | Description |
---|
Name | Returns | Usage | Description |
---|
Name | Type | Description |
---|---|---|
temp_path | string | platform-specific temporary file directory |
To create a new user object: var u = new User(number)
Name | Returns | Usage | Description |
---|
Name | Returns | Usage | Description |
---|
Name | Type | Description |
---|---|---|
errorlevel | number | error level returned from last executed external program |
msg_thread_back | number | message thread, back message number (AKA msg_thread_orig) |
Name | Returns | Usage | Description |
---|---|---|---|
uselect | number | console.uselect([number, string title, string item, string ars])
user selection menu, call for each item, then with no args to display select menu
| |
Name | Type | Description |
---|---|---|
input_buffer_level | number | number of bytes currently in the input buffer (from the remote client) - READ ONLY |
input_buffer_space | number | number of bytes available in the input buffer - READ ONLY |
output_buffer_level | number | number of bytes currently in the output buffer (from the local server) - READ ONLY |
output_buffer_space | number | number of bytes available in the output buffer - READ ONLY |
To create a new MsgBase object: var msgbase = new MsgBase('code')
where code is a sub-board internal code, or mail for the e-mail message base
Name | Returns | Usage | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
get_msg_header | object | MsgBase.get_msg_header([boolean by_offset,] number_or_id [,boolean expand_fields])
returns a specific message header, null on failure. | New in v3.12: Pass false for the expand_fields argument (default: true) if you will be re-writing the header later with put_msg_header() save_msg | boolean | MsgBase.save_msg(object header [,client] [,body_text] [,array rcpt_list])
| create a new message in message base, the header object may contain the following properties: |
New in v3.12: The optional client argument is an instance of the Client class to be used for the security log header fields (e.g. sender IP address, hostname, protocol, and port). New in v3.12: The optional rcpt_list is an array of objects that specifies multiple recipients for a single message (e.g. bulk e-mail). Each object in the array may include the following header properties (described above): to, to_ext, to_org, to_net_type, to_net_addr, and to_agent |
Name | Type | Description |
---|---|---|
status | number | return value of last SMB Library function call - READ ONLY |
Special features include:
To create a new File object: var f = new File(filename)
Name | Returns | Usage | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
iniSetValue | boolean | File.iniSetValue(section, key, value)
set the specified key to the specified value in the specified section of a .ini file. to set a key in the root section, pass null for section.
| iniSetObject | boolean | File.iniSetObject(section, object)
| write all the properties of the specified object as separate key=value pairs in the specified section of a .ini file. to write an object in the root section, pass null for section.
| iniSetAllObjects | array | File.iniSetAllObjects(object array [,name_property])
| write an array of objects to a .ini file, each object in its own section named after the object's name_property (default: name)
| |
To create a new (named) Queue object: var q = new Queue(name)
Name | Returns | Usage | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
poll | undefined | Queue.poll([timeout])
wait for a value on the queue for up to timeout milliseconds (default: infinite), returns true or the name (string) of the value waiting (if it has one), or false if no values are waiting
| read | undefined | Queue.read([name])
| read a value from the queue, if name not specified, reads next value from the bottom of the queue
| peek | undefined | Queue.peek()
| peek at the value at the bottom of the queue
| write | boolean | Queue.write(value [,name])
| write a value (optionally named) to the queue
| |
Name | Type | Description |
---|---|---|
name | undefined | name of the queue (if it has one) |
data_waiting | boolean | true if data is waiting to be read from queue |
read_level | number | number of values in the read queue |
write_level | number | number of values in the write qeueue |
To create a new Socket object: load('sockdefs.js'); var s = new Socket(type)
where type = SOCK_STREAM for TCP (default) or SOCK_DGRAM for UDP
Name | Returns | Usage | Description |
---|
Totals: 12 properties, 16 methods