Ejemplo n.º 1
0
func (this *MqFactoryS) New() *MqS {
	r := C.gomsgque_FactoryNew((*_Ctype_struct_MqFactoryS)(this))
	if r != nil {
		return (*MqS)(r)
	}
	panic("MqFactoryS exception")
}
Ejemplo n.º 2
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)
}