Esempio n. 1
0
 public TcpConnection(HostConnectionPool pool, ReusableTcpClient client)
 {
     _pool        = pool;
     _client      = client;
     _stream      = new BufferedStream(client.GetStream());
     _controlTime = DateTime.Now;
     _buffer      = new byte[TcpMessageIO.DefaultStreamBufferSize];
 }
Esempio n. 2
0
 private TcpConnection CreateConnection()
 {
     try
     {
         ReusableTcpClient client = new ReusableTcpClient(_host, _port);
         TcpConnection     entry  = new TcpConnection(this, client);
         _activeConnections++;
         return(entry);
     }
     catch (Exception ex)
     {
         throw new RemotingException(ex.Message);
     }
 }
Esempio n. 3
0
		private TcpConnection CreateConnection()
		{
			try
			{
				ReusableTcpClient client = new ReusableTcpClient(_host, _port);
				TcpConnection entry = new TcpConnection(this, client);
				_activeConnections++;
				return entry;
			}
			catch (Exception ex)
			{
				throw new RemotingException (ex.Message);
			}
		}
Esempio n. 4
0
		public TcpConnection (HostConnectionPool pool, ReusableTcpClient client)
		{
			_pool = pool;
			_client = client;
			_stream = new BufferedStream (client.GetStream());
			_controlTime = DateTime.Now;
			_buffer = new byte[TcpMessageIO.DefaultStreamBufferSize];
		}