1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 21:07:03 +00:00

add more websocket helpers from neffos project

Former-commit-id: fcb9ec46849fd745fe0f62524d9b85067a334048
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-06-15 14:07:35 +03:00
parent c93093d6c2
commit 164f24dec4
3 changed files with 23 additions and 6 deletions

View File

@@ -4,15 +4,25 @@ package websocket
import (
"github.com/kataras/neffos"
"github.com/kataras/neffos/gobwas"
"github.com/kataras/neffos/gorilla"
)
type (
// Dialer is the definition type of a dialer, gorilla or gobwas or custom.
// It is the second parameter of the `Dial` function.
Dialer = neffos.Dialer
// GorillaDialerOptions is just an alias for the `gobwas/ws.Dialer` struct type.
GorillaDialerOptions = gorilla.Options
// GobwasDialerOptions is just an alias for the `gorilla/websocket.Dialer` struct type.
GobwasDialerOptions = gobwas.Options
// Conn describes the main websocket connection's functionality.
// Its `Connection` will return a new `NSConn` instance.
// Each connection can connect to one or more declared namespaces.
// Each `NSConn` can join to multiple rooms.
Conn = neffos.Conn
// NSConn describes a connected connection to a specific namespace,
// NSConn describes a connection connected to a specific namespace,
// it emits with the `Message.Namespace` filled and it can join to multiple rooms.
// A single `Conn` can be connected to one or more namespaces,
// each connected namespace is described by this structure.