bool
PokeIn.IsConnected
Indicates the status
of connection. (Do not assign false to close the connection)
bool
PokeIn.IsListenActive()
Indicates the status
of listener.
bool PokeIn.PageUnloading
Indicates, whether the hosting page is unloading or not. You may check this parameter's value in order to decide for ReConnect call
event
PokeIn.OnServerNotAvailable
Fires when PokeIn can't connect to the server after 5 attempts
Use this functionality in order to detect your server is down. After this event fired, you need to reload the page since PokeIn won't be trying to connect.
Sample:
PokeIn.OnServerNotAvailable =
function (){
//put your codes here
};
string
PokeIn.GetClientId
Returns the active client
id.
Sample:
var client_id =
PokeIn.GetClientId();
string
PokeIn.GetJointId
Returns the active joint
id. Usable with the "Dynamic Bind" connections. "Joint Sample" project under samples page may helpful to understand the usage.
Sample:
var client_id =
PokeIn.GetJointId();
event
PokeIn.OnCompilerError
(PokeIn
version 1.30+)
Fires when a server side compilation error occurs.
Sample:
PokeIn.OnCompilerError =
function (message){
alert(message + “
received!”);
};
event
PokeIn.OnClientObjectsRemoved
(PokeIn version 1.30+)
Fires when the server side instance of this client removed due to;
·
Object corruption on server side class
·
Client is disconnected
·
Despite of Multiple view is disabled, another
one opened on same window
Sample:
PokeIn.OnClientObjectsRemoved =
function ( ){
//put your codes here
};
void
PokeIn.Close
Send “Disconnection” request to the
server and closes the client connection.This method doesn't fire OnClose event, even though the client disconnected after the call.
Sample:
PokeIn.Close();
event
PokeIn.OnClose
Fires when the active connection closed and server side instance of the
active client removed.
Sample:
PokeIn.OnClose =
function ( ){
//put your codes here
};
event
PokeIn.OnMessageReceived
(PokeIn
version 1.30+)
Fires when a new message received from the server.
Sample:
PokeIn.OnMessageReceived =
function (message
){
//put your codes here
};
event
PokeIn.OnMessageExecuted
(PokeIn
version 1.30+)
Fires when a server side message successfully executed.
Sample:
PokeIn.OnMessageExecuted =
function (){
//put your codes here
};
event
PokeIn.OnError
Fires when a client side compilation issue occurs.
Sample:
PokeIn.OnError =
function (message){
//put your codes here
};
void
PokeIn.ReConnect
Reconnects a client to
the server. (clientid will be changed and all the
PokeIn event assignments will be removed)
A successful call to this method will
raise document.OnPokeInReady event again.
Sample:
PokeIn.ReConnect();
Sample 2: if you want to define listener URL manually, you can use another version of this method.
PokeIn.ReConnect( listenerURL );
event document.OnPokeInReady
Fires when PokeIn
client side libraries entirely downloaded to the client browser.
Sample:
document.OnPokeInReady =
function (){
PokeIn.Start( function(is_started){
//put your codes here
});
};
void
PokeIn.Start
Sends a connection
request to the server.
Sample:
PokeIn.Start(
function(is_started){
//put your codes here
}
);