public void GetChatServerEndpoint(string login) { // .Arrange var balancer = new Balancer("balancer-cloud.global.livetex"); // .Act var endPointUrl = balancer.RequestChatServerEndpoint(login); // .Assert Assert.AreEqual(endPointUrl, "ws://action-1.unstable.livetex:19090"); }
private WebSocket CreateSocket(Balancer balancer) { var chatServerEndPointUrl = balancer.RequestChatServerEndpoint(this.Login); var webSocket = new WebSocket(chatServerEndPointUrl); webSocket.OnError += this.OnError; webSocket.OnClose += this.OnClose; webSocket.OnOpen += this.OnOpen; webSocket.OnMessage += this.OnMessage; return(webSocket); }