Well, as I tried, when you want other infomation(such as pktinfo) to get local address with setting syscall.setsockoption, you will need it. This happens when you don't want connection-oriented UDP.
This link has information about OOB in TCP.
With out-of-band data we want the byte-stream service layer on the sending side to send this data before any other data that it has buffered. Similarly we want the receiving end to pass this data to its user process ahead of any data that it might have buffered.
But what about UDP?
In golang, the
ReadMsgUDP function requires an
oob byte slice.
func (c *UDPConn) ReadMsgUDP(b, oob byte) (n, oobn, flags int, addr *UDPAddr, err error)
What is the
oob for? Are there any use cases in open source code? Or should I use
PacketConn instead of