Client Connection Example
An example demonstrating how to use CAXL's Client to connect to a server.
How it Works
This example automatically performs a number of actions in the page onReady event:
- Creating a jabberwerx.Client
- Registering for the jabberwerx.Client clientConnected event to update the client status on the screen after the client has successfully connected to the server
- Registering for the jabberwerx.Client clientDisconnected event to update the client status on the screen after the client has successfully disconnected from the server
The example also demonstrates the following functionality:
In Action
Instructions for using this example:
- Enter the user name and password in the fields provided.
- Click the "Connect" button to connect the client to the server.
- After successfully connecting, click the "Disconnect" button to disconnect from the server.
- To see an error message, simply input an incorrect user name or password and click the "Connect" button.