func (p *Proxy) SetFrontend(sockType int, endpoint string) error {
	typeString := getStringType(sockType)

	cmd := C.CString("FRONTEND")
	defer C.free(unsafe.Pointer(cmd))

	cTypeString := C.CString(typeString)
	defer C.free(unsafe.Pointer(cTypeString))

	cEndpoint := C.CString(endpoint)
	defer C.free(unsafe.Pointer(cEndpoint))

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

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

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

	rc = C.zsock_wait(unsafe.Pointer(p.zactorT))
	if rc == -1 {
		return ErrActorCmd
	}

	return nil
}
// SetFrontend accepts a socket type and endpoint, and sends a message
// to the zactor thread telling it to set up a socket bound to the endpoint.
SetFrontend accepts a socket type and endpoint, and sends a message
to the zactor thread telling it to set up a socket bound to the endpoint.
// SetFrontend accepts a socket type and endpoint and sends a message // to the zactor thread telling it to set up a socket bound to the endpoint .
func (p *Proxy) SetFrontend(sockType int, endpoint string) error {
	typeString := getStringType(sockType)
	cmd := C.CString("FRONTEND")
	defer C.free(unsafe.Pointer(cmd))
	cTypeString := C.CString(typeString)
	defer C.free(unsafe.Pointer(cTypeString))
	cEndpoint := C.CString(endpoint)
	defer C.free(unsafe.Pointer(cEndpoint))
	rc := C.zstr_sendm(unsafe.Pointer(p.zactorT), cmd)
	if rc == -1 {
		return ErrActorCmd
	}
	rc = C.zstr_sendm(unsafe.Pointer(p.zactorT), cTypeString)
	if rc == -1 {
		return ErrActorCmd
	}
	rc = C.zstr_send(unsafe.Pointer(p.zactorT), cEndpoint)
	if rc == -1 {
		return ErrActorCmd
	}
	rc = C.zsock_wait(unsafe.Pointer(p.zactorT))
	if rc == -1 {
		return ErrActorCmd
	}
	return nil
}
func ( p * Proxy ) SetFrontend ( sockType int , endpoint string ) error { typeString := getStringType ( sockType ) cmd := C . CString ( " " ) defer C . free ( unsafe . Pointer ( cmd ) ) cTypeString := C . CString ( typeString ) defer C . free ( unsafe . Pointer ( cTypeString ) ) cEndpoint := C . CString ( endpoint ) defer C . free ( unsafe . Pointer ( cEndpoint ) ) rc := C . zstr_sendm ( unsafe . Pointer ( p . zactorT ) , cmd ) if rc == - 1 { return ErrActorCmd } rc = C . zstr_sendm ( unsafe . Pointer ( p . zactorT ) , cTypeString ) if rc == - 1 { return ErrActorCmd } rc = C . zstr_send ( unsafe . Pointer ( p . zactorT ) , cEndpoint ) if rc == - 1 { return ErrActorCmd } rc = C . zsock_wait ( unsafe . Pointer ( p . zactorT ) ) if rc == - 1 { return ErrActorCmd } return nil }
SetFrontend accepts a socket type and endpoint, and sends a message
to the zactor thread telling it to set up a socket bound to the endpoint.
SetFrontend accepts a socket type and endpoint and sends a message to the zactor thread telling it to set up a socket bound to the endpoint .