How can I receive both unicast and broadcast datagram packets on the
same socket? I also need to be able to send broadcast and unicast
packets from the socket. Thus far I can send broadcast packets and
receive unicast, or send broadcast and receive broadcast, but I can't
do both on the same socket.
I have created a socket, bound the socket to a network address and
port, set the broadcast option on the socket, and used sendto and
recvfrom to send and receive packets. The sendto and recvfrom has a
sockaddr struct as a parameter that had a different port and the
broadcast address INADDR_BROADCAST.
Any examples would be much appreciated.
Chandler
|
|
0
|
|
|
|
Reply
|
apparatus
|
8/20/2003 11:17:43 AM |
|