2016-03-09 03:49:27 +01:00
|
|
|
package respond
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2017-12-05 23:17:49 +01:00
|
|
|
// default multicast group used by announced
|
|
|
|
multicastAddressDefault = "ff02:0:0:0:0:0:2:1001"
|
|
|
|
|
2016-03-09 03:49:27 +01:00
|
|
|
// default udp port used by announced
|
2017-01-29 22:14:40 +01:00
|
|
|
port = 1001
|
2016-03-09 03:49:27 +01:00
|
|
|
|
|
|
|
// maximum receivable size
|
2016-10-04 01:08:07 +02:00
|
|
|
maxDataGramSize = 8192
|
2016-03-09 03:49:27 +01:00
|
|
|
)
|
|
|
|
|
2017-10-18 18:22:14 +02:00
|
|
|
// Response of the respond request
|
2016-03-09 03:49:27 +01:00
|
|
|
type Response struct {
|
2017-10-18 18:22:14 +02:00
|
|
|
Address *net.UDPAddr
|
2016-03-09 03:49:27 +01:00
|
|
|
Raw []byte
|
|
|
|
}
|