private void EndClose(IAsyncResult ar) { try { Console.WriteLine("A connection has closed."); OnClose.EndInvoke(ar); } catch { } }