CommTest

This application facilitates testing of the CRSocket component, using default configuration settings. It consists of a controller/responder app pair that are identical, except that they are initiated with "controller" and "responder" clientRoles respectively.

Note that the accessToken must be a non-empty string of Ascii printable characters.

Functionality

JavaScript Console logging

All state changes and events transmitted from the CRSocket object and its internal CREventReceiver and CREventSender objects can be logged in the JavaScript console. Each log entry includes time in millisecs since the previous entry.

Low level server management

The app displays the number of "open", "error" and "message" events received by the internal CREventReceiver object (ServerIn) and events sent to the server by the CREventSender object (ServerOut). Message events are divided by type. All message event types are included except "crEvent".

Except for the clientid generator resource, all communication from the server passes through the eventsource resource. All communication to the server goes through the sendevent resource which is unidirectional and does not return any information. This means that all low level server managements are handled by these events.

Things to look out for:

Communication management events between CRSocket clients

The app displays the number of communication management events transmitted between clients (PartnerIn and PartnerOut).

Things to look out for:

EventReceiver timing

The app displays the amount of millisecs the CREventReceiver object spends in "connecting", "open" and "closed" states and the round trip time of "alive" events.

Things to look out for:

State monitoring

Current states and subStates of the CRSocket object, and its internal CREventReceiver and CREventSender objects. When the CRSocket object is not interacting with a partnerClient, subStates will in most cases reflect the reason why.

Socket properties

Core properties currently assigned to the CRSocket object:

Socket configuration

Assignment of the core CRSocket properties.

Please note:

Event transmission

The app can be used to test reception rate, delays and content accuracy of custom CREvent objects transmitted between crSockets. Using this functionality to send crEvents belonging to the communication protocol is not recommended.

Events can be sent by filling in the Event out fields and pressing the "Send button". Note that this will only be possible when the crSocket is in the "interacting" state. Events must always contain an eventType. In addition it is possible to assign a subType and toggle the buffered, logged and interceptable event flags. For single events it is also possible to assign up to two parameters.

To send multiple events, specify a count > 1, and min/max secs between events (must always be > 1). The param1 and param2 fields will automatically be set to the current event number and the current delay to the next event in millisecs.

Things to look out for: