func (o *BrowseOp) Stop() {
	o.m.Lock()
	defer o.m.Unlock()
	if !o.started {
		return
	}
	o.started = false
	pollServer.stopOp(o)
}
Stop stops the operation.
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
}
func (o *BrowseOp) SetCallback(f BrowseCallbackFunc) error {
	o.m.Lock()
	defer o.m.Unlock()
	if o.started {
		return ErrStarted
	}
	o.callback = f
	return nil
}
func (o *BrowseOp) Start() error {
	o.m.Lock()
	defer o.m.Unlock()
	if o.started {
		return ErrStarted
	}
	if o.callback == nil {
		return ErrMissingCallback
	}
	err := pollServer.startOp(o)
	o.started = err == nil || err == ErrStarted
	return err
}
func (o *BrowseOp) init(sharedref uintptr) (ref uintptr, err error) {
	ref = sharedref
	o.setFlag(_FlagsShareConnection, ref != 0)
	if err = browseStart(&ref, o.flags, o.interfaceIndexC(), o.stype, o.domain, unsafe.Pointer(o)); err != nil {
		ref = 0
	}
	return
}