new BoobstSocket(options)
Boobst Socket
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Properties:
Name | Type | Description |
---|---|---|
callback |
function | |
emit |
function |
Extends
- events.EventEmitter
Members
host :string
Host
Type:
- string
id :number
Server's process id
Type:
- number
onConnectionCallback :function
Type:
- function
order
Returns next subscript based on current
port :number
Port
Type:
- number
queue :Array
Commands queue
Type:
- Array
saveObject
Save javascript-оbject in Cache'
socket :net.Socket
Connection socket
Type:
- net.Socket
version :number
Protocol varsion
Type:
- number
Methods
blob(uri, stream, callbackopt)
Send binary data
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
uri |
string | uri format is: file:// |
|
stream |
Stream | data stream | |
callback |
function |
<optional> |
callback |
connect(callbackopt) → {boobst.BoobstSocket}
Connect to DB
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
callback |
Returns:
- Type
- boobst.BoobstSocket
disconnect(callbackopt)
Disconnect from the db
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
callback |
execute(name, outStreamopt, callback)
Execute routine
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | имя существующей команды | |
outStream |
stream.Stream |
<optional> |
поток, в который пересылать ответ сервера |
callback |
function | callback |
flush(callbackopt)
Clear the local namespace and set the server variables again
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
callback |
get(name, subscriptopt, forceJSONopt, callback)
Get value
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | Name of variable or global node | |
subscript |
Array.<string> | boolean | function |
<optional> |
|
forceJSON |
boolean | function |
<optional> |
force get JSON from node |
callback |
function | Callback-function (error, data) |
kill(name, subscriptsopt, callbackopt)
Kill a global or a local
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | ||
subscripts |
Array.<string> | function |
<optional> |
|
callback |
function |
<optional> |
callback |
ping(callbackopt)
Check server state
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
callback |
set(name, subscriptsopt, value, callbackopt, nullable) → {boobst.BoobstSocket|BoobstSocket}
Set the value of variable or global
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | variable or global name (global name starts with `^`) | |
subscripts |
string | Buffer | Array.<string> |
<optional> |
|
value |
string | Buffer | function | number | Date | variable value | |
callback |
function |
<optional> <nullable> |
callback |
Returns:
- Type
- boobst.BoobstSocket | BoobstSocket
xecute(xecute, outStreamopt, callback)
Evaluates any code on the server. Dangerous thing disabled on server by default
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
xecute |
string | text to xecute | |
outStream |
stream.Stream |
<optional> |
stream to send data |
callback |
function | callback |
zn(name, callbackopt)
Changes namespace
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | existing namespace | |
callback |
function |
<optional> |
callback |