diff options
author | Bas van Kervel <bas@ethdev.com> | 2016-03-29 21:07:40 +0800 |
---|---|---|
committer | Bas van Kervel <bas@ethdev.com> | 2016-04-02 00:26:35 +0800 |
commit | f7328c5ecbd1076582a71ef7bf436485f3868b1f (patch) | |
tree | a32f466f00306cb131bee254cbe14a4dcaa68973 /rpc/websocket.go | |
parent | fb578f4550a08617485d9146876489d1f3bb1b52 (diff) | |
download | dexon-f7328c5ecbd1076582a71ef7bf436485f3868b1f.tar.gz dexon-f7328c5ecbd1076582a71ef7bf436485f3868b1f.tar.zst dexon-f7328c5ecbd1076582a71ef7bf436485f3868b1f.zip |
rpc: add pub/sub support
Diffstat (limited to 'rpc/websocket.go')
-rw-r--r-- | rpc/websocket.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rpc/websocket.go b/rpc/websocket.go index 92615494e..499eedabe 100644 --- a/rpc/websocket.go +++ b/rpc/websocket.go @@ -93,7 +93,8 @@ func NewWSServer(cors string, handler *Server) *http.Server { Handler: websocket.Server{ Handshake: wsHandshakeValidator(strings.Split(cors, ",")), Handler: func(conn *websocket.Conn) { - handler.ServeCodec(NewJSONCodec(&wsReaderWriterCloser{conn})) + handler.ServeCodec(NewJSONCodec(&wsReaderWriterCloser{conn}), + OptionMethodInvocation|OptionSubscriptions) }, }, } |