Ticket #949 (closed Enhancement: fixed)

Opened 8 years ago

Last modified 8 years ago

DM4 WebSockets: broadcast to all but origin client

Reported by: jri Owned by: jri
Priority: Major Milestone:
Component: 3rd Party Plugins Version:
Keywords: Cc: dgf, Malte, JuergeN
Complexity: 3 Area: Application Framework / API

Description (last modified by jri) (diff)

Scenario: a client updates its view and all other connected clients needs to be synced.

Change History

comment:1 Changed 8 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 8 years ago by jri

  • Description modified (diff)

comment:3 Changed 8 years ago by jri

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

WebSockets?: broadcast to all but origin client.

1 new method in WebSocketsService:

import org.eclipse.jetty.websocket.WebSocket.Connection;

void broadcast(String pluginUri, String message, Connection exclude);

Broadcasts a WebSocket? message to all connected clients except to the client whose Connection is passed.


1 new arg in WebsocketTextMessageListener:

void websocketTextMessage(String message, Connection connection)

When the server receives a WebSocket? message it passes the Connection through which the message arrived.

See #949

comment:4 Changed 8 years ago by jri

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

Refactor: don't export Jetty API.

The DM WebSockets? API no longer relies on org.eclipse.jetty.websocket.WebSocket.Connection but on de.deepamehta.plugins.websockets.WebSocketConnection. The Jetty API is hidden. The Jetty packages are not exported anymore.

See #949.

comment:5 Changed 8 years ago by jri

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