diff --git a/protocol/jsonrpc/options.go b/protocol/jsonrpc/options.go index da33262..e03aa23 100644 --- a/protocol/jsonrpc/options.go +++ b/protocol/jsonrpc/options.go @@ -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 } }