Esempio n. 1
0
func FactoryDefault(ident string, cb FactoryF) {
	v := C.CString(ident)
	r := C.gomsgque_FactoryDefault(v, C.MQ_PTR(&cb))
	C.free(unsafe.Pointer(v))
	iErrorFactoryToGoWithCheck(r)
	lockFactory[&cb] = true
}
Esempio n. 2
0
func (this *MqS) SendEND_AND_CALLBACK2(token string, cb Service2) {
	t := C.CString(token)
	r := C.gomsgque_SendEND_AND_CALLBACK2((*_Ctype_struct_MqS)(this), t, C.MQ_PTR(&cb))
	C.free(unsafe.Pointer(t))
	this.iErrorMqToGoWithCheck(r)
	incrService2Ref(&cb)
}
Esempio n. 3
0
func FactoryAdd(ident string, cb FactoryF) {
	v := C.CString(ident)
	r := C.gomsgque_FactoryAdd(v, C.MQ_PTR(&cb))
	C.free(unsafe.Pointer(v))
	iErrorFactoryToGoWithCheck(r)
	incrFactoryRef(&cb)
}
Esempio n. 4
0
func FactoryNew(ident string, cb FactoryF) *MqS {
	v := C.CString(ident)
	out := C.gomsgque_FactoryNew(v, C.MQ_PTR(&cb))
	C.free(unsafe.Pointer(v))
	iErrorFactoryToGoWithCheck(out.ret)
	lockFactory[&cb] = true
	return (*MqS)(out.ctx)
}
Esempio n. 5
0
//export CreateThread
func CreateThread(data *_Ctype_struct_MqSysServerThreadMainS) *chan bool {
	chn := make(chan bool)
	lockThread[&chn] = true
	go func() {
		runtime.LockOSThread()
		C.gomsgque_SysServerThreadMain(data, C.MQ_PTR(&chn))
	}()
	return &chn
}
Esempio n. 6
0
func FactoryDefault(ident string, cb FactoryF) *MqFactoryS {
	v := C.CString(ident)
	r := C.gomsgque_FactoryDefault(v, C.MQ_PTR(&cb))
	C.free(unsafe.Pointer(v))
	incrFactoryRef(&cb)
	if r == nil {
		panic("MqFactoryS exception")
	}
	return (*MqFactoryS)(r)
}
Esempio n. 7
0
func (this *MqDumpS) Delete() {
	C.MqSysFreeP(C.MQ_PTR(this))
}