1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +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

@@ -28,10 +28,17 @@ var (
// See examples for more.
New = neffos.New
// GorillaDialer is a gorilla/websocket dialer with all fields set to the default values.
GorillaDialer = gorilla.DefaultDialer
// GobwasDialer is a gobwas/ws dialer with all fields set to the default values.
GobwasDialer = gobwas.DefaultDialer
// GorillaDialer is a `Dialer` type for the gorilla/websocket subprotocol implementation.
// Should be used on `Dial` to create a new client/client-side connection.
GorillaDialer = gorilla.Dialer
// GobwasDialer is a `Dialer` type for the gobwas/ws subprotocol implementation.
// Should be used on `Dial` to create a new client/client-side connection.
GobwasDialer = gobwas.Dialer
// DefaultGorillaDialer is a gorilla/websocket dialer with all fields set to the default values.
DefaultGorillaDialer = gorilla.DefaultDialer
// DefaultGobwasDialer is a gobwas/ws dialer with all fields set to the default values.
DefaultGobwasDialer = gobwas.DefaultDialer
// Dial establishes a new websocket client connection.
// Context "ctx" is used for handshake timeout.
// Dialer "dial" can be either `GorillaDialer` or `GobwasDialer`,