Added function to send a pre-defined packet via an argument.

Changed update functions to return the received packet.