public void TryToStartLongPollingRequestWithoutDefineLongPollingDataSource()
        {
            var httpDataSource = new HttpDataSource("http://www.google.pl");
            var connection = new BayeuxConnection(httpDataSource, null);

            connection.StartLongPolling(new HandshakeRequest(BayeuxConnectionTypes.LongPolling, null, null));
        }
 /// <summary>
 /// Init constructor.
 /// </summary>
 public BayeuxConnectionEventArgs(BayeuxConnection connection, HttpStatusCode statusCode, string statusDescription, string data, JSonReaderException exception)
 {
     Connection = connection;
     StatusCode = statusCode;
     StatusDescription = statusDescription;
     Data = data;
     Exception = exception;
 }
Beispiel #3
0
 /// <summary>
 /// Init constructor.
 /// </summary>
 public BayeuxConnectionEventArgs(BayeuxConnection connection, HttpStatusCode statusCode, string statusDescription, string data, JSonReaderException exception)
 {
     Connection        = connection;
     StatusCode        = statusCode;
     StatusDescription = statusDescription;
     Data      = data;
     Exception = exception;
 }
 /// <summary>
 /// Init constructor.
 /// </summary>
 public BayeuxConnectionEventArgs(BayeuxConnection connection, HttpStatusCode statusCode, string statusDescription, string data, IJSonObject message, BayeuxResponse response)
 {
     Connection = connection;
     StatusCode = statusCode;
     StatusDescription = statusDescription;
     Data = data;
     Message = message;
     Response = response;
 }
Beispiel #5
0
 /// <summary>
 /// Init constructor.
 /// </summary>
 public BayeuxConnectionEventArgs(BayeuxConnection connection, HttpStatusCode statusCode, string statusDescription, string data, IJSonObject message, BayeuxResponse response)
 {
     Connection        = connection;
     StatusCode        = statusCode;
     StatusDescription = statusDescription;
     Data     = data;
     Message  = message;
     Response = response;
 }
        public void CheckIfByDefaultLongPollingConnectionIsNotCreated()
        {
            var httpDataSource = new HttpDataSource("http://www.google.pl");
            var connection = new BayeuxConnection(httpDataSource); // <--- different constructor used, comparing to CreateBayeuxConnectionWithoutLongPolling() test

            connection.LongPollingTimeout = 100;

            Assert.IsFalse(connection.IsLongPolling);
            Assert.AreEqual(0, connection.LongPollingTimeout);
        }
        public void CreateBayeuxConnectionWithoutLongPolling()
        {
            var httpDataSource = new HttpDataSource("http://www.google.pl");
            var connection = new BayeuxConnection(httpDataSource, null);

            connection.LongPollingTimeout = 100;

            Assert.IsFalse(connection.IsLongPolling);
            Assert.AreEqual(0, connection.LongPollingTimeout);
        }
        public void InitializeLongPollingConnection()
        {
            var httpDataSource = new HttpDataSource("http://www.google.pl");
            var httpLongPollingDataSource = new HttpDataSource("http://www.google.pl/long");
            const int Timeout = 150;
            var connection = new BayeuxConnection(httpDataSource, httpLongPollingDataSource);

            connection.LongPollingTimeout = Timeout;

            Assert.AreEqual(Timeout, connection.LongPollingTimeout);
        }
Beispiel #9
0
        public void TestInit()
        {
            connection = new BayeuxConnection("http://192.168.2.179:8080/cometd/");
            connection.DataReceived += LogDataReceived;
            connection.DataFailed += LogDataFailed;
            connection.ConnectionFailed += LogConnectionFailed;
            connection.Timeout = 2000;

            waiter = new AsyncWaiter();
            waiter.Reset();
        }
 /// <summary>
 /// Init constructor.
 /// </summary>
 public BayeuxConnectionEventArgs(BayeuxConnection connection, HttpStatusCode statusCode, string statusDescription, string data, IJSonObject message)
     : this (connection, statusCode, statusDescription, data, message, null)
 {
 }
 /// <summary>
 /// Init constructor.
 /// </summary>
 public BayeuxConnectionEventArgs(BayeuxConnection connection, HttpStatusCode statusCode, string statusDescription)
 {
     Connection = connection;
     StatusCode = statusCode;
     StatusDescription = statusDescription;
 }
Beispiel #12
0
 /// <summary>
 /// Init constructor.
 /// </summary>
 public BayeuxConnectionEventArgs(BayeuxConnection connection, HttpStatusCode statusCode, string statusDescription, string data, IJSonObject message)
     : this(connection, statusCode, statusDescription, data, message, null)
 {
 }
Beispiel #13
0
 /// <summary>
 /// Init constructor.
 /// </summary>
 public BayeuxConnectionEventArgs(BayeuxConnection connection, HttpStatusCode statusCode, string statusDescription)
 {
     Connection        = connection;
     StatusCode        = statusCode;
     StatusDescription = statusDescription;
 }