Packagecom.multiuserserver.server
Interfacepublic interface IClient

Mesmotronic Multiuser Server 2 Client Interface

This interface should not be used directly: it is the interface used by elements of the application.clients Array of the MultiuserServerApplication class.

Availability: 2.0.0

See also

MultiuserServerApplication.html


Public Properties
 PropertyDefined by
  connected : Boolean
Whether there is a client connected in this slot.
IClient
  ip : String
[read-only] The client's IP address.
IClient
Public Methods
 MethodDefined by
  
call(method:String, argArray:Array = null, returnMethod:String = null):Boolean

Call a client-side application method and (optionally) have the result returned to the server-side application.

Availability: 2.0.0

IClient
  
close():void
Closes the connection to the specified client.
IClient
Property detail
connectedproperty
connected:Boolean  [read-write]

Whether there is a client connected in this slot.

Availability: 2.0.0

Implementation
    public function get connected():Boolean
    public function set connected(value:Boolean):void
ipproperty 
ip:String  [read-only]

The client's IP address.

Availability: 2.0.0

Implementation
    public function get ip():String
Method detail
call()method
public function call(method:String, argArray:Array = null, returnMethod:String = null):Boolean

Call a client-side application method and (optionally) have the result returned to the server-side application.

Availability: 2.0.0

Parameters
method:String — method Method name to call on the client.
 
argArray:Array (default = null) — argArray Arguments to pass to the client method: most standard data types are supported, including Object, Array, String, Boolean and Number. (optional)
 
returnMethod:String (default = null) — returnMethod Server method to return the result to. (optional)

Returns
Boolean — Boolean value indicating whether the call was made.

Example
application.clients[0].call("myMethod", [100, 200], "onMyMethod");

close()method 
public function close():void

Closes the connection to the specified client.

Availability: 2.0.0


Example
application.clients[0].close();