void OnAcceptTransport(TransportListener listener, TransportAsyncCallbackArgs args)
{
AmqpConnectionSettings connectionSettings = new AmqpConnectionSettings()
{
ContainerId = this.containerId,
MaxFrameSize = this.maxFrameSize
};
AmqpConnection connection = null;
try
{
connection = this.CreateConnection(
args.Transport,
(ProtocolHeader)args.UserToken,
false,
this.settings,
connectionSettings);
connection.BeginOpen(connection.DefaultOpenTimeout, this.OnConnectionOpenComplete, connection);
}
catch (Exception ex)
{
if (connection != null)
{
connection.SafeClose(ex);
}
}
}