client packet handling.