func (o *BrowseOp) SetCallback(f BrowseCallbackFunc) error {
	o.m.Lock()
	defer o.m.Unlock()
	if o.started {
		return ErrStarted
	}
	o.callback = f
	return nil
}
SetCallback sets the function to call when an error occurs or a service is lost or found.
package dnssd
import "unsafe"
type BrowseCallbackFunc func(op *BrowseOp, err error, add bool, interfaceIndex int, name string, serviceType string, domain string)
type BrowseOp struct {
	baseOp
	stype    string
	domain   string
	callback BrowseCallbackFunc
}
func NewBrowseOp(serviceType string, f BrowseCallbackFunc) *BrowseOp {
	op := &BrowseOp{}
	op.SetType(serviceType)
	op.SetCallback(f)
	return op
}
func StartBrowseOp(serviceType string, f BrowseCallbackFunc) (*BrowseOp, error) {
	op := NewBrowseOp(serviceType, f)
	return op, op.Start()
}
func (o *BrowseOp) Type() string {
	o.m.Lock()
	defer o.m.Unlock()
	return o.stype
}
func (o *BrowseOp) SetType(s string) error {
	o.m.Lock()
	defer o.m.Unlock()
	if o.started {
		return ErrStarted
	}
	o.stype = s
	return nil
}
func (o *BrowseOp) Domain() string {
	o.m.Lock()
	defer o.m.Unlock()
	return o.domain
}
func (o *BrowseOp) SetDomain(s string) error {
	o.m.Lock()
	defer o.m.Unlock()
	if o.started {
		return ErrStarted
	}
	o.domain = s
	return nil
}