secureConnect() with Orbiter not working

All Union Platform questions, comments, feature requests, and bug reports.

secureConnect() with Orbiter not working

Postby echologic » Sat 26 Sep 2015 15:10

Hi Union Platform,

I'm trying to actuate TLS/SSL with the example Orbiter chat application:

At the bottom of the TLS/SSL Configuration page it states: "In Orbiter and OrbiterMicro (Union's JavaScript client frameworks), the Orbiter class defines a secureConnect() method used to create WSS and HTTPS connections to Union Server." However secureConnect() is not listed in the Orbiter API info and only seems to be working as an aspect of reactor.

I get as far as:
Connecting to Union...
Connected.
Joining chat room...
...before I get the following error: Uncaught TypeError: orbiter.getRoomManager is not a function.

(note: I'm using port 444 for the secureGateway because port 443 is being used.)

My XML config is:
<gateways>
<gateway id="PrimaryGateway" type="TCP">
<ip>example</ip>
<port>9100</port>
<policy_file>policy.xml</policy_file>
<access_control_allow_origin>*</access_control_allow_origin>
</gateway>
<gateway id="SecureGateway" type="SecureTCP">
<ip>example</ip>
<port>444</port>
<policy_file>policy.xml</policy_file>
<keystore_file>/root/host.example</keystore_file>
<keystore_password>example</keystore_password>
</gateway>
</gateways>

----
The chat code:

// Connect to Union Server
orbiter.secureConnect("example.com", 444);
}

//==============================================================================
// ORBITER EVENT LISTENERS
//==============================================================================
// Triggered when the connection is ready
function readyListener (e) {
displayChatMessage("Connected.");
displayChatMessage("Joining chat room...");

// Create the chat room on the server
chatRoom = orbiter.getRoomManager().createRoom("chatRoom");
chatRoom.addEventListener(net.user1.orbiter.RoomEvent.JOIN, joinRoomListener);
chatRoom.addEventListener(net.user1.orbiter.RoomEvent.ADD_OCCUPANT, addOccupantListener);
chatRoom.addEventListener(net.user1.orbiter.RoomEvent.REMOVE_OCCUPANT, removeOccupantListener);


I'm at a loss and am hoping you can point me in the right direction?
echologic
 
Posts: 12
Joined: Fri 16 Dec 2011 02:43

Return to Union Platform

Online

Users browsing this forum: No registered users and 1 guest