Skip to content

[middleware] WebSocket middleware (websocket) #196

@FumingPower3925

Description

@FumingPower3925

WebSocket Middleware (websocket)

WebSocket upgrade and connection management.

Separate Go module: github.com/goceleris/middlewares/websocket

External Dependency

github.com/gorilla/websocket

Core Integration

Uses celeris core Hijack() for raw connection access:

  1. Validates the WebSocket upgrade request
  2. Calls c.Hijack() to get the raw net.Conn
  3. Hands the connection to gorilla/websocket.Upgrade()
  4. Provides a Handler callback with a *websocket.Conn

Config

  • Handler, CheckOrigin, Subprotocols, ReadBufferSize/WriteBufferSize, HandshakeTimeout

Migrated from goceleris/middlewares#35

Metadata

Metadata

Labels

middlewareMiddleware implementation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions