pack server packets before sending them to clients