Connect() public method

public Connect ( ) : void
return void
Ejemplo n.º 1
0
 public CachedConnection GetUnlimitedNewConnection()
 {
     CachedConnection c = new CachedConnection (this);
     lock (connections) {
         connections.Add (c);
     }
     c.Connect ();
     return c;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates and return a new connection.
 /// If the maximum number of connections to that server is reached,
 /// it will return null.
 /// </summary>
 public CachedConnection GetNewConnection()
 {
     CachedConnection c = new CachedConnection (this);
     lock (connections) {
         if (connections.Count >= max) {
             return null;
         }
         connections.Add (c);
     }
     c.Connect ();
     return c;
 }