Previous section To contents Next section

13.2.2 Protocols.LysKOM.Connection

CLASS
Protocols.LysKOM.Connection

DESCRIPTION
This class contains nice abstraction for calls into the server. They are named "call", "async_call" or "async_cb_call", depending on how you want the call to be done.

METHOD
Protocols.LysKOM.Connection./call/,
Protocols.LysKOM.Connection.async_/call/,
Protocols.LysKOM.Connection.async_cb_/call/

SYNTAX
mixed /call/(mixed ...args)
object async_/call/(mixed ...args)
object async_cb_/call/(function callback, mixed ...args)

DESCRIPTION
Do a call to the server. This really clones a request object, and initialises it. /call/ is to be read as one of the calls in the lyskom protocol. ('-' is replaced with '_'.) (ie, logout, async_login or async_cb_get_conf_stat.)

The first method is a synchronous call. This will send the command, wait for the server to execute it, and then return the result.

The last two is asynchronous calls, returning the initialised request object.

variable int protocol_level variable string session_software variable string software_version Description of the connected server.

METHOD
Protocols.LysKOM.Connection.create

SYNTAX
void create(string server)
void create(string server, mapping options)

DESCRIPTION
([
   "login" : int|string    login as this person number
                         (get number from name)
   "password" : string     send this login password
   "invisible" : int(0..1) if set, login invisible
   advanced
   "port" : int(0..65535)  server port (default is 4894)
   "whoami" : string       present as this user
                         (default is from uid/getpwent and hostname)
])

Previous section To contents Next section