code: function onWsRequest(request) {
    if (-1 == request.requestedProtocols.indexOf(ragentsServer.wsProtocol)) {
      return request.reject()
    }
  
    request.accept(ragentsServer.wsProtocol, request.origin)
  }
docs: ------------------------------------------------------------------------------