ing
This commit is contained in:
parent
24629d21f6
commit
38206e9718
@ -5,8 +5,8 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
OnRequestFunc func(soc gws.Socket, method string, params interface{}) (interface{}, error)
|
||||
OnNotifyFunc func(soc gws.Socket, method string, params interface{}) error
|
||||
OnRequestFunc func(soc gws.Socket, method string, params []string) (interface{}, error)
|
||||
OnNotifyFunc func(soc gws.Socket, method string, params []string) error
|
||||
)
|
||||
|
||||
// ClientOptions is configuration of the websocket server
|
||||
@ -18,13 +18,13 @@ type Options struct {
|
||||
// Validate validates the configuration
|
||||
func (o *Options) Validate() *Options {
|
||||
if o.OnRequest == nil {
|
||||
o.OnRequest = func(soc gws.Socket, method string, params interface{}) (interface{}, error) {
|
||||
o.OnRequest = func(soc gws.Socket, method string, params []string) (interface{}, error) {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
|
||||
if o.OnNotify == nil {
|
||||
o.OnNotify = func(soc gws.Socket, method string, params interface{}) error {
|
||||
o.OnNotify = func(soc gws.Socket, method string, params []string) error {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user