aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/websocket.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-04-05 15:43:32 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-04-05 15:43:32 +0800
commited92f116f72646e73613afc2f2e7b83472a61434 (patch)
tree6c6d3cf414e21ee37d93e30e782ec028ff0144f8 /rpc/websocket.go
parent6a185531d2cd2003bb4352c391f9dca023894d5a (diff)
parentf7328c5ecbd1076582a71ef7bf436485f3868b1f (diff)
downloaddexon-ed92f116f72646e73613afc2f2e7b83472a61434.tar.gz
dexon-ed92f116f72646e73613afc2f2e7b83472a61434.tar.zst
dexon-ed92f116f72646e73613afc2f2e7b83472a61434.zip
Merge pull request #2407 from bas-vk/rpc-notifications
RPC pub sub
Diffstat (limited to 'rpc/websocket.go')
-rw-r--r--rpc/websocket.go3
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)
},
},
}