func (o *RegisterOp) SetHost(h string) error {
	o.m.Lock()
	defer o.m.Unlock()
	if o.started {
		return ErrStarted
	}
	o.host = h
	return nil
}
SetHost sets the hostname of the service. An empty string will result in the local machine's hostname being used.
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()
}
func (o *RegisterOp) Name() string {
	o.m.Lock()
	defer o.m.Unlock()
	return o.name
}
func (o *RegisterOp) SetName(n string) error {
	o.m.Lock()
	defer o.m.Unlock()
	if o.started {
		return ErrStarted
	}
	o.name = n
	return nil
}
func (o *RegisterOp) Type() string {
	o.m.Lock()
	defer o.m.Unlock()
	return o.stype
}
func (o *RegisterOp) SetType(s string) error {
	o.m.Lock()
	defer o.m.Unlock()
	if o.started {
		return ErrStarted
	}
	o.stype = s
	return nil
}
func (o *RegisterOp) Domain() string {
	o.m.Lock()
	defer o.m.Unlock()
	return o.domain
}
func (o *RegisterOp) SetDomain(s string) error {
	o.m.Lock()
	defer o.m.Unlock()
	if o.started {
		return ErrStarted
	}
	o.domain = s
	return nil
}
func (o *RegisterOp) Host() string {
	o.m.Lock()
	defer o.m.Unlock()
	return o.host
}