コード例 #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];
 }
コード例 #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);
     }
 }
コード例 #3
0
ファイル: TcpConnectionPool.cs プロジェクト: nlhepler/mono
		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);
			}
		}
コード例 #4
0
ファイル: TcpConnectionPool.cs プロジェクト: nlhepler/mono
		public TcpConnection (HostConnectionPool pool, ReusableTcpClient client)
		{
			_pool = pool;
			_client = client;
			_stream = new BufferedStream (client.GetStream());
			_controlTime = DateTime.Now;
			_buffer = new byte[TcpMessageIO.DefaultStreamBufferSize];
		}