void ReadComplete(IAsyncResult result)
{
int bytes = _input.EndRead(result);
if (bytes == 0)
{
RaiseComplete();
return;
}
try
{
_output.Write(buffer, 0, bytes);
GetData();
}
catch (Exception)
{
//we swallow all since there is nothing we can do now
RaiseComplete();
}
}