WebsocketRouteRegistration
Este conteúdo não está disponível em sua língua ainda.
WebsocketRouteRegistration =
object
Defined in: src/http/backend/HttpServerBackend.ts:21
One WebSocket route registration. The backend accepts the HTTP
upgrade at pattern (a GET), MUST call authorize first (a non-null
result means: send that plain HTTP response and DO NOT upgrade), and
then call onConnection exactly once — synchronously inside its
native open/upgrade callback — handing over a normalised socket.
Everything actor-related lives behind onConnection; the backend
never sees the framework’s actors.
Properties
Section titled “Properties”authorize
Section titled “authorize”
readonlyauthorize: (request) =>Promise<HttpResponse|null>
Defined in: src/http/backend/HttpServerBackend.ts:25
Pre-upgrade guard. null → proceed; HttpResponse → reject with it.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Promise<HttpResponse | null>
onConnection
Section titled “onConnection”
readonlyonConnection: (request,socket) =>void
Defined in: src/http/backend/HttpServerBackend.ts:27
Called once per accepted connection, synchronously in the upgrade callback.
Parameters
Section titled “Parameters”request
Section titled “request”socket
Section titled “socket”Returns
Section titled “Returns”void
pattern
Section titled “pattern”
readonlypattern:string
Defined in: src/http/backend/HttpServerBackend.ts:23
':param'-style pattern, same dialect as RouteRegistration.pattern.
