Exemplo n.º 1
0
        public XSynqSubscriber(XDocument xDocument, XSynqSession session, Uri uri)
        {
            ConnectionState = ConnctionStates.Init;

            XDocument = xDocument;

            Provisione(session, uri);
            Subscribe();
        }
Exemplo n.º 2
0
        private void Subscribe()
        {
            if (ConnectionState != ConnctionStates.Init)
            {
                throw new InvalidOperationException("Estado incorrecto, no puede suscribir.");
            }
            ConnectionState = ConnctionStates.Trying;
            var d = new SubscribeDelegate(AsyncSubscribe);

            d.BeginInvoke(AsyncSubscribeComplete, d);
        }
Exemplo n.º 3
0
        public XSynqSubscriber(XDocument xDocument, XSynqSession session, Uri uri, int BufferSize)
        {
            ConnectionState = ConnctionStates.Init;
            XDocument       = xDocument;

            var binding = new NetTcpBinding
            {
                Name                   = "NetTcpBinding_Client",
                SendTimeout            = new TimeSpan(0, 5, 0),
                TransferMode           = TransferMode.Buffered,
                MaxBufferPoolSize      = BufferSize,
                MaxBufferSize          = BufferSize,
                MaxReceivedMessageSize = BufferSize,
                ReaderQuotas           = { MaxStringContentLength = BufferSize }
            };

            Provisione(session, binding, uri);
            Subscribe();
        }
Exemplo n.º 4
0
 public XSynqSubscriber()
 {
     ConnectionState = ConnctionStates.Init;
 }