associate clients by IP and fix udp writing