...how to connect via ip to a udp server
Maybe this will help clear things up: you don't connect to a UDP server.
TCP has "connections" which are established through handshaking packets and provide the organization required to ensure messages are retransmitted if lost, and provided in the right order.
UDP is dirt simple, it just sends single packets to IP addresses. No connections and no guarantees about delivery. You could code some super-reliable UDP client/server code, but you'd basically be re-implementing TCP.
Do you absolutely need to use UDP? TCP is easier to use. Later, if you decide that TCP isn't quick enough for some traffic, you can switch some (possibly redundant) communications over to UDP, while continuing to use TCP for stability.