1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 21:15:56 +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

@@ -39,7 +39,8 @@ type (
// i.e on `OnNamespaceConnect` it will abort a remote namespace connection.
// See examples for more.
MessageHandlerFunc = neffos.MessageHandlerFunc
// ConnHandler is the interface which namespaces and events can be retrieved through.
ConnHandler = neffos.ConnHandler
// Events completes the `ConnHandler` interface.
// It is a map which its key is the event name
// and its value the event's callback.
@@ -63,6 +64,11 @@ type (
//
// See `New` and `Dial`.
WithTimeout = neffos.WithTimeout
// Struct completes the `ConnHandler` interface.
// It uses a structure to register a specific namespace and its events.
Struct = neffos.Struct
// StructInjector can be used to customize the value creation that can is used on serving events.
StructInjector = neffos.StructInjector
// The Message is the structure which describes the incoming and outcoming data.
// Emitter's "body" argument is the `Message.Body` field.
// Emitter's return non-nil error is the `Message.Err` field.