protected override async Task<ITcpConnection> ConnectAsync(string host, int port, bool useSsl, CancellationToken cancellationToken) { InnerConnection = new TcpConnection(useSsl); await InnerConnection.ConnectAsync(host, port, cancellationToken); return InnerConnection; }
byte[] DoRead(TcpConnection con, int bytes) { var headerBytes = new byte[bytes]; con._client.ReadStream.Read(headerBytes, 0, bytes); return headerBytes; }