in src/core/connectionHelpers/LpcConnectionHelper.js [103:124]
initWebsocketManager(websocketManager, connectionDetailsProvider) {
this.websocketManager = websocketManager || WebSocketManager.create();
this.websocketManager.subscribeTopics(["aws/chat"]);
this.subscriptions = [
this.websocketManager.onMessage("aws/chat", this.handleMessage.bind(this)),
this.websocketManager.onConnectionGain(this.handleConnectionGain.bind(this)),
this.websocketManager.onConnectionLost(this.handleConnectionLost.bind(this)),
this.websocketManager.onInitFailure(this.handleEnded.bind(this))
];
if (!websocketManager) {
this.websocketManager.init(
() => connectionDetailsProvider.fetchConnectionDetails()
.then(connectionDetails => ({
webSocketTransport: {
url: connectionDetails.url,
expiry: connectionDetails.expiry,
transportLifeTimeInSeconds: TRANSPORT_LIFETIME_IN_SECONDS
}
}))
);
}
}