| Package | com.multiuserserver.server |
| Interface | public interface IClient |
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
| Property | Defined by | ||
|---|---|---|---|
| connected : Boolean
Whether there is a client connected in this slot.
| IClient | ||
| ip : String [read-only]
The client's IP address.
| IClient | ||
| Method | Defined 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 | ||
| connected | property |
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
| ip | property |
ip:String [read-only]The client's IP address.
Availability: 2.0.0
Implementation public function get ip():String
| 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
Parametersmethod: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)
|
Boolean — Boolean value indicating whether the call was made.
|
application.clients[0].call("myMethod", [100, 200], "onMyMethod");
| close | () | method |
public function close():voidCloses the connection to the specified client.
Availability: 2.0.0
application.clients[0].close();