udp_receive(+Socket,
-Data, -From, +Options)atom, codes, string (default) or
term. The value term causes the data to be
parsed to a Prolog string.octet. iso_latin_1, text
or
utf8.The typical sequence to receive UDP data is:
receive(Port) :-
udp_socket(Socket),
tcp_bind(Socket, Port),
repeat,
udp_receive(Socket, Data, From, [as(atom)]),
format('Got ~q from ~q~n', [Data, From]),
fail.