Stone.js API
    Preparing search index...
    • Method decorator: handle new connections.

      The method runs when a transport (WS adapter) accepts a connection. Like every keyed handler it receives (payload, event); for connect the payload is empty, read the connection with connectionOf(event).

      Returns MethodDecorator

      A method decorator.

      @RealtimeGateway()
      export class Presence {
      @OnConnect() onConnect (_, event) { const connection = connectionOf(event) }
      }