Ejemplo n.º 1
0
func Init(argv ...string) {
	initB := C.MqInitCreate()
	for _, arg := range argv {
		s := C.CString(arg)
		C.MqBufferLAppendC(initB, s)
		C.free(unsafe.Pointer(s))
	}
}
Ejemplo n.º 2
0
func Init(argv ...string) {
	initB := C.gomsgque_InitArg0()
	for _, arg := range argv {
		s := C.CString(arg)
		C.MqBufferLAppendC(initB, s)
		C.free(unsafe.Pointer(s))
	}
}
Ejemplo n.º 3
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))
}
Ejemplo n.º 4
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))
}