public async Task<ITcpSocketClient> CreateResponseSocket()
{
var portAddress = Data.PortAddress;
if (portAddress != null)
{
var result = new TcpSocketClient();
await result.ConnectAsync(portAddress.Host, portAddress.Port);
return result;
}
if (Data.PassiveSocketClient == null)
throw new InvalidOperationException("Passive connection expected, but none found");
return Data.PassiveSocketClient;
}