/// <summary> /// the basic client handler -- calls processor.process in a loop, /// until the client disconnects /// </summary> /// <param name="processor"> /// the processor instance that represents the client /// </param> protected static void handleClient(Protocol.BaseProcessor processor) { try { while (true) { processor.process(); } } catch (EndOfStreamException) { // finish on EOF } catch (IOException) { // usually a "connection reset by peer" -- just clean up nicely, // the connection is dead anyway } finally { processor.Close(); } }