1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

MVC improvements: add HandleWebsocket that now registers events automatically based on the struct's methods(!) and fix a bug when more than one value of the same type is registered to a static field of a controller

Former-commit-id: e369d1426ac1a6b58314930a18362670317da3c1
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-07-09 12:16:19 +03:00
parent 85666da682
commit 450f20902d
18 changed files with 383 additions and 183 deletions

View File

@@ -53,13 +53,15 @@ var (
//
// See examples for more.
Dial = neffos.Dial
// IsTryingToReconnect reports whether the returning "err" from the `Server#Upgrade`
// is from a client that was trying to reconnect to the websocket server.
//
// Look the `Conn#WasReconnected` and `Conn#ReconnectTries` too.
IsTryingToReconnect = neffos.IsTryingToReconnect
// NewStruct returns the `Struct` Conn Handler based on ptr value.
NewStruct = neffos.NewStruct
// JoinConnHandlers combines two or more ConnHandlers as one.
JoinConnHandlers = neffos.JoinConnHandlers
// 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.