Did you know ... | Search Documentation: |
Predicate udp_broadcast_initialize/2 |
ip(A,B,C,D)
or an atom or string of the format A.B.C.D
. Options
processed:
subnet
.For compatibility reasons Options may be the subnet mask.
Although the broadcast
networks are the default.
multicast networks have the
advantage that you do not need to know your IP address and, with router
support, they can be used on a WAN. Therefore simplest way to initialise
the network to make two or more processes communicate on a LAN is using
a multicast
network:
?- udp_broadcast_initialize(ip(239,0,0,2), [method(multicast)]). ?- listen(write(X), writeln(X)). ?- broadcast(udp(subnet, write(hello))). hello