some udp setup and data reading, this looks like it is going to be a state hell