1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

update the nantive-messages(only) example to the latest websocket (minimum changes, the idea is the same) and misc

Former-commit-id: 9598319bc13e8a383114c37f4da84f337ab47b22
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-06-25 22:10:10 +03:00
parent 8ad4c061d1
commit 33028f900d
8 changed files with 172 additions and 88 deletions

View File

@@ -34,7 +34,6 @@ var (
// 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.
@@ -50,6 +49,14 @@ var (
// See examples for more.
Dial = neffos.Dial
// IsTryingToReconnect reports whether the "err" is from a client
// that was trying to reconnect to the websocket server,
// the first output parameter is the number of total reconnection retries,
// including the previous failures and the succeed last one.
//
// Use it on registered callbacks for `Server#OnUpgradeError`.
IsTryingToReconnect = neffos.IsTryingToReconnect
// OnNamespaceConnect is the event name which its callback is fired right before namespace connect,
// if non-nil error then the remote connection's `Conn.Connect` will fail and send that error text.
// Connection is not ready to emit data to the namespace.