kkrpc
    Preparing search index...

    Function createElysiaWebSocketIO

    • Create a new Elysia WebSocket server IO instance

      Parameters

      • ws: any

        Elysia WebSocket instance from the ws/open callback

      Returns ElysiaWebSocketServerIO

      A new ElysiaWebSocketServerIO instance

      import { Elysia } from 'elysia'
      import { createElysiaWebSocketIO } from 'kkrpc/elysia-websocket'

      new Elysia()
      .ws('/rpc', {
      open(ws) {
      const io = createElysiaWebSocketIO(ws)
      // Use io with RPCChannel...
      }
      })