Class: BoobstSocket

BoobstSocket

new BoobstSocket(options)

Boobst Socket
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Description
port number <optional>
port
host string <optional>
host
Properties:
Name Type Description
callback function
emit function
Source:

Extends

  • events.EventEmitter

Members

host :string

Host
Type:
  • string
Source:

id :number

Server's process id
Type:
  • number
Source:

onConnectionCallback :function

Type:
  • function
Source:

order

Returns next subscript based on current
Source:

port :number

Port
Type:
  • number
Source:

queue :Array

Commands queue
Type:
  • Array
Source:

saveObject

Save javascript-оbject in Cache'
Deprecated:
  • Yes
Source:

socket :net.Socket

Connection socket
Type:
  • net.Socket
Source:

version :number

Protocol varsion
Type:
  • number
Source:

Methods

blob(uri, stream, callbackopt)

Send binary data
Parameters:
Name Type Attributes Description
uri string uri format is: file:// or global://
stream Stream data stream
callback function <optional>
callback
Source:

connect(callbackopt) → {boobst.BoobstSocket}

Connect to DB
Parameters:
Name Type Attributes Description
callback function <optional>
callback
Source:
Returns:
Type
boobst.BoobstSocket

disconnect(callbackopt)

Disconnect from the db
Parameters:
Name Type Attributes Description
callback function <optional>
callback
Source:

execute(name, outStreamopt, callback)

Execute routine
Parameters:
Name Type Attributes Description
name string имя существующей команды
outStream stream.Stream <optional>
поток, в который пересылать ответ сервера
callback function callback
Source:

flush(callbackopt)

Clear the local namespace and set the server variables again
Parameters:
Name Type Attributes Description
callback function <optional>
callback
Source:

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)
Source:

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
Source:

ping(callbackopt)

Check server state
Parameters:
Name Type Attributes Description
callback function <optional>
callback
Source:

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
Source:
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
Source:

zn(name, callbackopt)

Changes namespace
Parameters:
Name Type Attributes Description
name string existing namespace
callback function <optional>
callback
Source: