MCPcopy Create free account
hub / github.com/CPChain/chain / NewWSServer

Function NewWSServer

api/rpc/websocket.go:79–81  ·  view source on GitHub ↗

NewWSServer creates a new websocket RPC server around an API provider. Deprecated: use Server.WebsocketHandler

(allowedOrigins []string, srv *Server)

Source from the content-addressed store, hash-verified

77//
78// Deprecated: use Server.WebsocketHandler
79func NewWSServer(allowedOrigins []string, srv *Server) *http.Server {
80 return &http.Server{Handler: srv.WebsocketHandler(allowedOrigins)}
81}
82
83// wsHandshakeValidator returns a handler that verifies the origin during the
84// websocket upgrade process. When a '*' is specified as an allowed origins all

Callers 1

StartWSEndpointFunction · 0.85

Calls 1

WebsocketHandlerMethod · 0.80

Tested by

no test coverage detected