Simplified packet sending code.