public UnixConnection(HostConnectionPool pool, ReusableUnixClient client) { this._pool = pool; this._client = client; this._stream = new BufferedStream(client.GetStream()); this._controlTime = DateTime.Now; this._buffer = new byte[UnixMessageIO.DefaultStreamBufferSize]; }
public static UnixConnection GetConnection(string path) { HostConnectionPool hostPool; lock (_pools) { hostPool = (HostConnectionPool)_pools[path]; if (hostPool == null) { hostPool = new HostConnectionPool(path); _pools[path] = hostPool; } } return(hostPool.GetConnection()); }
public static UnixConnection GetConnection(string path) { HostConnectionPool item; Hashtable hashtables = UnixConnectionPool._pools; Monitor.Enter(hashtables); try { item = (HostConnectionPool)UnixConnectionPool._pools[path]; if (item == null) { item = new HostConnectionPool(path); UnixConnectionPool._pools[path] = item; } } finally { Monitor.Exit(hashtables); } return(item.GetConnection()); }
public static UnixConnection GetConnection (string path) { HostConnectionPool hostPool; lock (_pools) { hostPool = (HostConnectionPool) _pools[path]; if (hostPool == null) { hostPool = new HostConnectionPool(path); _pools[path] = hostPool; } } return hostPool.GetConnection(); }
public UnixConnection (HostConnectionPool pool, ReusableUnixClient client) { _pool = pool; _client = client; _stream = new BufferedStream (client.GetStream()); _controlTime = DateTime.Now; _buffer = new byte[UnixMessageIO.DefaultStreamBufferSize]; }