getsockname, getpeername, setsockopt
udp_server_or_client