v0.0.4
Pre-release
Pre-release
Improvements of the neffos.NewStruct connection handler.
- With the new
EnableDebug(nil_or_custom_printer)
theneffos.NewStruct
will log which field is marked as static, which method is handling a specific event and etc. - A new method
Events() neffos.Events
is added to the return value of theneffos.NewStruct
in order to handle that struct as rawneffos.Events
- this adds support to wrap one or more "controllers" on aneffos.Namespaces
orneffos.WithTimeout
connection handler. Note that whenEvents()
is used then itsSetNamespace
andSetTimeouts
have no effect because they should be handled by the parent level instead.
Example Code:
var events = neffos.Namespaces{
"ns1": neffos.NewStruct(new(myWebsocketController)).Events(),
"ns2": neffos.Events{...},
}
Have fun!