[PATCH 8/8] servmon(): move keypress and packet handling into separate functions