Working sending and serialization of packets