updated server UDP using a struct rather than manually writing to a char buffer