unicast and broadcast on same socket

  • Follow


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


0 Replies
677 Views

(page loaded in 0.03 seconds)

Similiar Articles:













7/23/2012 2:38:36 AM


Reply: