Acquires a connection from the connection pool.
Namespace:
IBM.CTGAssembly: IBM.CTG.Client (in IBM.CTG.Client.dll) Version: 1.0.0.0
Syntax
C# |
---|
public GatewayConnection GetConnection() |
Visual Basic |
---|
Public Function GetConnection As GatewayConnection |
Visual C++ |
---|
public: GatewayConnection^ GetConnection() |
Remarks
If there is no connection immediately available in the pool and the number of connections in the pool is less than MaxConnections, a new connection will be established.
Exceptions
Exception | Condition |
---|---|
System..::..ObjectDisposedException | The GatewayConnectionPool has been closed. |
System.Net.Sockets..::..SocketException |
A new connection was attempted but the host name did not resolve to a valid IP address. -or- A new connection was attempted but could not be established. |
System.Security..::..SecurityException | A new connection was attempted but a caller higher in the call stack does not have permission for the requested operation. |
IBM.CTG..::..GatewayException | A new connection was attempted but an error occurred within the Gateway daemon. |