Ticket #1019 (closed Enhancement: fixed)

Opened 8 years ago

Last modified 8 years ago

Add config options for websocket connection

Reported by: JuergeN Owned by: jri
Priority: Major Milestone: Release 4.8.4
Component: DeepaMehta Standard Distribution Version: 4.8.3
Keywords: Cc:
Complexity: 3 Area: Runtime Environment
Module:

Description

As administrator I want to be able to config both the serverside webservice ip/port and the client side websocket connection url in a config file. This is a must have to run more than one instance on the same host and to adjust the client e.g. whether running on localhost or behind an ssl proxy based setup.

Change History

comment:1 Changed 8 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 8 years ago by Jörg Richter <jri@…>

In b9eb370e5c2fe04f9bed86c43a40a6def9146b85/deepamehta:

Add 2 WebSocket? config properties (#1019).

# The port the WebSockets server opens for accepting connections
dm4.websockets.port = 8081

# The URL the WebSocket clients use to connect to the WebSockets server
dm4.websockets.url = ws://localhost:8081

The default values are shown.

See #1019.

comment:3 Changed 8 years ago by jri

In https://github.com/jri/dm4-websockets/commit/e9a0ef7:

Configurable WebSockets? server port (#1019).

dm4.websockets.port = 8081

See #1019.

comment:4 Changed 8 years ago by jri

In https://github.com/jri/dm4-websockets/commit/6263a1e:

Add REST resource to get the config (#1019).

GET /websockets

Returns the WebSockets? configuration to be evaluated at client-side.

See #1019.

comment:5 Changed 8 years ago by jri

In https://github.com/jri/dm4-websockets/commit/7b2f35e:

Drop url parameter from client-side API (#1019).

BREAKING CHANGE

Client-side WebSockets? API

The create_websocket() method has only 2 parameters left. The url parameter is dropped.
The URL to connect to is determined automatically, based on the server-side dm4.websockets.url config property.

dm4c.get_plugin("de.deepamehta.websockets").create_websocket(plugin_uri, message_processor)

See #1019.

comment:6 Changed 8 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.