func (server *Server) Handshake(config *ws.Config, request *http.Request) (err error) { for _, protocol := range config.Protocol { if protocol == "cscn" { config.Protocol = []string{protocol} return nil } } return ws.ErrBadWebSocketProtocol }
func checkWAMPHandshake(config *websocket.Config, req *http.Request) error { for _, protocol := range config.Protocol { if protocol == "wamp" { config.Protocol = []string{protocol} return nil } } return websocket.ErrBadWebSocketProtocol }