[client_socket] rewrite to distinguish udp/tcp, udp works \o/