# connectToServer
Description
Connect to the server.
A positive response indicates that the command has been accepted for execution. The connection result will be reported separately.
The successful server connection will be indicated by:
- Reception of the notification On_serverConnected
- The change in current connection status in On_appStateChanged
void connectToServer(string server, int port)
Parameters
Name | Description |
---|---|
server | Server to connect to |
port | Port. This parameter is optional. If it is not specified, the default port will be used. |
Response example
{
"method" : "connectToServer",
"requestId" : "1",
"result" : true
}
Response Parameters
Name | Description |
---|---|
requestId | A unique request identifier |
result | A flag indicating whether the request was successful |
See also