func (o *RegisterOp) Name() string {
	o.m.Lock()
	defer o.m.Unlock()
	return o.name
}
Name returns the name of the service.
package dnssd
import (
	"os"
	"unsafe"
)
type RegisterCallbackFunc func(op *RegisterOp, err error, add bool, name, serviceType, domain string)
type RegisterOp struct {
	baseOp
	name   string
	stype  string
	domain string
	host   string
	port   int
	txt    struct {
		l int
		m map[string]string
	}
	callback RegisterCallbackFunc
	seenAdd  bool
}
func NewRegisterOp(name, serviceType string, port int, f RegisterCallbackFunc) *RegisterOp {
	op := &RegisterOp{}
	op.SetName(name)
	op.SetType(serviceType)
	op.SetPort(port)
	op.SetCallback(f)
	return op
}
func StartRegisterOp(name, serviceType string, port int, f RegisterCallbackFunc) (*RegisterOp, error) {
	op := NewRegisterOp(name, serviceType, port, f)
	return op, op.Start()
}
func NewProxyRegisterOp(name, serviceType, host string, port int, f RegisterCallbackFunc) *RegisterOp {
	op := NewRegisterOp(name, serviceType, port, f)
	op.SetHost(host)
	return op
}
func StartProxyRegisterOp(name, serviceType, host string, port int, f RegisterCallbackFunc) (*RegisterOp, error) {
	op := NewProxyRegisterOp(name, serviceType, host, port, f)
	return op, op.Start()
}