0.8.1 • Published 22 days ago

@loopback/socketio v0.8.1

Weekly downloads
209
License
MIT
Repository
github
Last release
22 days ago

@loopback/socketio

Stability: :warning: Experimental :warning:

This module uses socket.io to expose controllers as WebSocket friendly endpoints.

Use Cases

  1. A real time application would like to use WebSocket friendly APIs to manage subscriptions, participants (rooms) and message exchanges.

  2. Make it easy for API developers to expose WebSocket friendly APIs without learning a lot of low level concepts.

  3. Use it as a step stone to explore messaging oriented API paradigms and programming models, such as pub/sub, eventing, streaming, and reactive.

High Level Design

The package will provide the following key constructs:

  • SocketIoServer: A new server type that listens on incoming WebSocket connections and dispatches messages to controllers that subscribe to the namespace. Each server is attached to an http/https endpoint.

  • SocketIo controller: A controller class that is decorated with SocketIo related metadata, including:

    • Map to a namespace
    • Connect/disconnect events
    • Subscribe/consume messages
    • Publish/produce messages
  • SocketIo middleware or sequence

    • Allow common logic to intercept/process WebSocket messages

Basic Use

  1. Create a SocketIoServer
  2. Define a controller to handle socket.io events/messages
  3. Register the controller
  4. Discover socket.io controllers and mount them to the SocketIoServer namespaces.

Sample application

socket.io

Installation

npm install --save @loopback/socketio

Contributions

Tests

Run npm test from the root folder.

Contributors

See all contributors.

License

MIT

0.8.1

22 days ago

0.8.0

2 months ago

0.7.6

4 months ago

0.7.5

5 months ago

0.7.2

10 months ago

0.7.4

8 months ago

0.7.3

9 months ago

0.7.1

10 months ago

0.7.0

12 months ago

0.6.9

1 year ago

0.6.10

1 year ago

0.6.8

1 year ago

0.6.7

1 year ago

0.6.6

1 year ago

0.6.5

1 year ago

0.6.4

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago