Ejemplo n.º 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 protected ClientBase()
 {
     _pingTimer          = new Timer(pingInterval);
     _pingTimer.Elapsed += PingTimer_Elapsed;
     ConnectTimeout      = DefaultConnectionAttemptTimeout;
     WireProtocol        = WireProtocolManager.GetDefaultWireProtocol();
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 protected ScsClientBase()
 {
     _pingTimer          = new Timer(30000);
     _pingTimer.Elapsed += PingTimer_Elapsed;
     ConnectTimeout      = Defaulttimeout;
     WireProtocol        = WireProtocolManager.GetDefaultWireProtocol();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructor.
 ///
 /// </summary>
 protected ScsClientBase()
 {
     this._pingTimer          = new Timer(30000);
     this._pingTimer.Elapsed += new EventHandler(this.PingTimer_Elapsed);
     this.ConnectTimeout      = 15000;
     this.WireProtocol        = WireProtocolManager.GetDefaultWireProtocol();
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     Constructor.
 /// </summary>
 protected ClientBase()
 {
     _pingTimer          = new SimpleConnectionTimer(30000);
     _pingTimer.Elapsed += PingTimer_Elapsed;
     ConnectTimeout      = DefaultConnectionAttemptTimeout;
     WireProtocol        = WireProtocolManager.GetDefaultWireProtocol();
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructor.
 /// </summary>
 protected ScsClientBase()
 {
     _pingTimer          = new Timer(30000);
     _pingTimer.Elapsed += PingTimer_Elapsed;
     ConnectTimeout      = DefaultConnectionAttemptTimeout;
     IsTimeoutDisconnect = true;
     WireProtocol        = WireProtocolManager.GetDefaultWireProtocol();
 }
Ejemplo n.º 6
0
        /// <summary>
        ///     Creates a new TcpCommunicationChannel object.
        /// </summary>
        /// <param name="clientSocket">
        ///     A connected Socket object that is
        ///     used to communicate over network
        /// </param>
        public TcpCommunicationChannel(Socket clientSocket)
        {
            WireProtocol = WireProtocolManager.GetWireProtocol("Binary");

            _clientSocket = clientSocket;
            // @TODO: Enable support for partial data and nagle algorithm in JsonWireProtocol
            _clientSocket.NoDelay = false;

            var ipEndPoint = (IPEndPoint)_clientSocket.RemoteEndPoint;

            _remoteEndPoint = new TcpEndPoint(ipEndPoint.Address.ToString(), ipEndPoint.Port);

            _buffer   = new byte[ReceiveBufferSize];
            _syncLock = new object();
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Constructor.
 ///
 /// </summary>
 protected ScsServerBase()
 {
     this.Clients             = new ThreadSafeSortedList <long, IScsServerClient>();
     this.WireProtocolFactory = WireProtocolManager.GetDefaultWireProtocolFactory();
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Constructor.
 /// </summary>
 protected ServerBase()
 {
     this.Clients             = new ConcurrentDictionary <long, IServerClient>();
     this.WireProtocolFactory = WireProtocolManager.GetDefaultWireProtocolFactory();
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Constructor.
 /// </summary>
 protected ScsClientBase()
 {
     ConnectTimeout = DefaultConnectionAttemptTimeout;
     WireProtocol   = WireProtocolManager.GetDefaultWireProtocol();
 }