Skip to content

Af2NetConnection.call

Petro O. Bochan edited this page Sep 2, 2023 · 8 revisions

Usage
myConnection.call(remoteMethod [, resultBool, pN])

Parameters
remoteMethod - A parameter assigned to a callable object instance on the server.
result - A boolean value to specify if a Af2NetConnection.onResult event handler to be called on server return of the call. If you don’t need a result object, pass false.
parameters - Optional parameters object to be passed to the specified method.

Description
Method; invokes a command or method on the server. You must create a server-side function to define this method.

Example
The following function checks for a message, sends it, then clears the local string.

private void mySend() {
  Af2Message msg = new Af2Message();
  msg.name = "affluxis";
  connection.call("message", false, msg);
  msg.name = "";
}

Clone this wiki locally