SetControlMessage allows to receive the per packet basis IP-level socket options.
(cf ControlFlags, on bool)
| 74 | // SetControlMessage allows to receive the per packet basis IP-level |
| 75 | // socket options. |
| 76 | func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error { |
| 77 | if !c.payloadHandler.ok() { |
| 78 | return errInvalidConn |
| 79 | } |
| 80 | return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on) |
| 81 | } |
| 82 | |
| 83 | // SetDeadline sets the read and write deadlines associated with the |
| 84 | // endpoint. |