func (b *Beacon) Publish(announcement string, interval int) error {
	cmd := C.CString("PUBLISH")
	defer C.free(unsafe.Pointer(cmd))

	cAnnouncement := C.CString(announcement)
	defer C.free(unsafe.Pointer(cAnnouncement))

	cInterval := C.CString(strconv.Itoa(interval))
	defer C.free(unsafe.Pointer(cInterval))

	rc := C.zstr_sendm(unsafe.Pointer(b.zactorT), cmd)
	if rc == -1 {
		return ErrActorCmd
	}

	rc = C.zstr_sendm(unsafe.Pointer(b.zactorT), cAnnouncement)
	if rc == -1 {
		return ErrActorCmd
	}

	rc = C.zstr_send(unsafe.Pointer(b.zactorT), cInterval)
	if rc == -1 {
		return ErrActorCmd
	}

	return nil
}
// Publish publishes an announcement string at an interval
Publish publishes an announcement string at an interval
// Publish publishes an announcement string at an interval
func (b *Beacon) Publish(announcement string, interval int) error {
	cmd := C.CString("PUBLISH")
	defer C.free(unsafe.Pointer(cmd))
	cAnnouncement := C.CString(announcement)
	defer C.free(unsafe.Pointer(cAnnouncement))
	cInterval := C.CString(strconv.Itoa(interval))
	defer C.free(unsafe.Pointer(cInterval))
	rc := C.zstr_sendm(unsafe.Pointer(b.zactorT), cmd)
	if rc == -1 {
		return ErrActorCmd
	}
	rc = C.zstr_sendm(unsafe.Pointer(b.zactorT), cAnnouncement)
	if rc == -1 {
		return ErrActorCmd
	}
	rc = C.zstr_send(unsafe.Pointer(b.zactorT), cInterval)
	if rc == -1 {
		return ErrActorCmd
	}
	return nil
}
func ( b * Beacon ) Publish ( announcement string , interval int ) error { cmd := C . CString ( " " ) defer C . free ( unsafe . Pointer ( cmd ) ) cAnnouncement := C . CString ( announcement ) defer C . free ( unsafe . Pointer ( cAnnouncement ) ) cInterval := C . CString ( strconv . Itoa ( interval ) ) defer C . free ( unsafe . Pointer ( cInterval ) ) rc := C . zstr_sendm ( unsafe . Pointer ( b . zactorT ) , cmd ) if rc == - 1 { return ErrActorCmd } rc = C . zstr_sendm ( unsafe . Pointer ( b . zactorT ) , cAnnouncement ) if rc == - 1 { return ErrActorCmd } rc = C . zstr_send ( unsafe . Pointer ( b . zactorT ) , cInterval ) if rc == - 1 { return ErrActorCmd } return nil }
Publish publishes an announcement string at an interval
Publish publishes an announcement string at an interval