first revision of tcp to udp conversion functions. Added comments and helper functions. Also modified client and server to use socklen_t instead of int