示例#1
0
 public void send_gatekeeper()
 {
     gatekeeper g = new gatekeeper(protocol.credentials, protocol.authentication_timeout, protocol.authentication_attempts--, 401, "Unauthorized", "http://example.com/api/error#401");
     protocol.SocketSend(g.ToString());
 }
示例#2
0
 public void gatekeeper()
 {
     gatekeeper g = new gatekeeper("api_key", 5, 3, 403,"example.com websocket api requires an api key", "http://example.com/api/error#403");
     string expected = "[1,[\"api_key\"],5,3,403,\"example.com websocket api requires an api key\",\"http:\\/\\/example.com\\/api\\/error#403\"]";
     Assert.AreEqual(g.ToString(), expected);
 }