Beispiel #1
0
func (this *MqS) SlaveWorker(id int32, argv ...string) {
	var largv *_Ctype_struct_MqBufferLS
	if len(argv) != 0 {
		largv = C.MqBufferLCreate(C.MQ_SIZE(len(argv)))
		for idx := range argv {
			a := C.CString(argv[idx])
			C.MqBufferLAppendC(largv, a)
			C.free(unsafe.Pointer(a))
		}
	}
	this.iErrorMqToGoWithCheck(C.MqSlaveWorker((*_Ctype_struct_MqS)(this), C.MQ_SIZE(id), &largv))
}
Beispiel #2
0
func (this *MqS) ServiceGetFilter2(i int32) *MqS {
	ret := C.MqServiceGetFilter2((*_Ctype_struct_MqS)(this), C.MQ_SIZE(i))
	if ret == nil {
		this.ErrorRaise()
	}
	return (*MqS)(ret)
}
Beispiel #3
0
func (this *MqS) LinkCreateChild(parent *MqS, argv ...string) {
	var largv *_Ctype_struct_MqBufferLS
	//fmt.Println("LinkCreateChild -> argv = " + strings.Join(argv,","))
	if len(argv) != 0 {
		largv = C.MqBufferLCreate(C.MQ_SIZE(len(argv)))
		for idx := range argv {
			a := C.CString(argv[idx])
			C.MqBufferLAppendC(largv, a)
			C.free(unsafe.Pointer(a))
		}
	}
	this.iErrorMqToGoWithCheck(C.MqLinkCreateChild((*_Ctype_struct_MqS)(this), (*_Ctype_struct_MqS)(parent), &largv))
}
Beispiel #4
0
func (this *MqS) SlaveGet(id int32) *MqS {
	return (*MqS)(C.MqSlaveGet((*_Ctype_struct_MqS)(this), C.MQ_SIZE(id)))
}
Beispiel #5
0
func (this *MqS) SlaveDelete(id int32) {
	this.iErrorMqToGoWithCheck(C.MqSlaveDelete((*_Ctype_struct_MqS)(this), C.MQ_SIZE(id)))
}
Beispiel #6
0
func (this *MqS) SlaveCreate(id int32, slv *MqS) {
	this.iErrorMqToGoWithCheck(C.MqSlaveCreate((*_Ctype_struct_MqS)(this),
		C.MQ_SIZE(id), (*_Ctype_struct_MqS)(slv)))
}
Beispiel #7
0
func (this *MqBufferS) SetB(val *MqBinary) *MqBufferS {
	return (*MqBufferS)(C.MqBufferSetB((*_Ctype_struct_MqBufferS)(this), C.MQ_CBI(val.D), C.MQ_SIZE(val.L)))
}
Beispiel #8
0
func (this *MqS) SendN(val *MqBinary) {
	this.iErrorMqToGoWithCheck(C.MqSendN((*_Ctype_struct_MqS)(this), C.MQ_CBI(val.D), C.MQ_SIZE(val.L)))
}
Beispiel #9
0
func (this *MqS) ServiceProxy2(token string, i int32) {
	t := C.CString(token)
	this.iErrorMqToGoWithCheck(C.MqServiceProxy((*_Ctype_struct_MqS)(this), t, C.MQ_SIZE(i)))
	C.free(unsafe.Pointer(t))
}