theLink 10.0
Loading...
Searching...
No Matches
MqContextC_Link_CC_API

MqContextC - setup and manage a client-server-linkMore...

+ Collaboration diagram for MqContextC_Link_CC_API:

Functions

MqContextCccmqmsgque::MqContextC::LinkGetParent ()
  C++: MqContextC* ctx.LinkGetParent() C-API
get the initial parent-context from a client/server link …
 
void ccmqmsgque::MqContextC::LinkConnect ()
  C++: ctx.LinkConnect() C-API
re-connect a client-server-link after a server crash or a network downtime …
 
void ccmqmsgque::MqContextC::LinkCreate (MkBufferListC *args=NULL)
  C++: ctx.LinkCreate(MkBufferListC* args = NULL) C-API
make ctx to a parent-context and setup a new client-server-link
 
void ccmqmsgque::MqContextC::LinkCreate (const MkBufferListC &args)
  C++: ctx.LinkCreate(MkBufferListC* args = NULL) C-API
make ctx to a parent-context and setup a new client-server-link
 
void ccmqmsgque::MqContextC::LinkCreateChild (MqContextC *parent, MkBufferListC *args=NULL)
  C++: ctx.LinkCreateChild(MqContextC* parent, MkBufferListC* args = NULL) C-API
make a context to a child-context on-top of an existing parent-client-server-link
 
void ccmqmsgque::MqContextC::LinkCreateChild (const MqContextC &parent, const MkBufferListC &args)
  C++: ctx.LinkCreateChild(MqContextC* parent, MkBufferListC* args = NULL) C-API
make a context to a child-context on-top of an existing parent-client-server-link
 
void ccmqmsgque::MqContextC::LinkDelete ()
  C++: ctx.LinkDelete() C-API
close the client-server-link
 
MK_NUM ccmqmsgque::MqContextC::LinkGetCtxId ()
  C++: MK_NUM ctx.LinkGetCtxId() C-API
get an identifier which is unique per parent-or-child-context
 
MK_STRN ccmqmsgque::MqContextC::LinkGetTargetIdent ()
  C++: MK_STRN ctx.LinkGetTargetIdent() C-API
get the ident of the link-target
 
MK_BOOL ccmqmsgque::MqContextC::LinkIsConnected ()
  C++: MK_BOOL ctx.LinkIsConnected() C-API
is the context connected? …
 
MK_BOOL ccmqmsgque::MqContextC::LinkIsParent ()
  C++: MK_BOOL ctx.LinkIsParent() C-API
is the context a parent-context? …
 
void ccmqmsgque::MqContextC::LinkShutdown ()
  C++: ctx.LinkShutdown() C-API
shutdown the communication with a server
 
void ccmqmsgque::MqContextC::LinkCheckOptionI32 (MK_STRN opt, MK_I32 *val)
  C++: ctx.LinkCreate(MkBufferListC* args = NULL) C-API
make ctx to a parent-context and setup a new client-server-link
 

Detailed Description

MqContextC - setup and manage a client-server-link

The client-server-link connect two context, a client-parent-context and a server-parent-context. The link can be local (connect two context on the same host) or can be remote (connect two context on different hosts). On-Top the parent-context multiple child-context are allowed.

  !on remote host!                                  !on local host!

      server1---------x                     x----------server2
         |            |                     |             |
         |     child-context-1       child-context-2      |
         |            |                     |             |                      server
 parent-context-1-----x                     x-----parent-context-2
         |                                                |
 (MqConfigS::server)                 (example: MqConfigS::server --fork --uds … --file …)
         |                                                |
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         |                                                |
      (--tcp)                                  (--pipe, --uds, --tcp)
         |                                                |
 parent-context-1-----x                     x-----parent-context-2
         |            |                     |             |                      client
         |     child-context-1       child-context-2      |
         |            |                     |             |
         x------------x--------client-------x-------------x

                           !on local host!

Definition of a "client-context"

Definition of a "server-context"

client --tcp --host REMOTE_HOST --port REMOTE_PORT ... or
client --uds --file MYFILE ...

Definition of a "parent-context"

Definition of a "child-context"

The client-server-link connect two context, a client-parent-context and a server-parent-context. The link can be local (connect two context on the same host) or can be remote (connect two context on different hosts). On-Top the parent-context multiple child-context are allowed.

  !on remote host!                                  !on local host!

      server1---------x                     x----------server2
         |            |                     |             |
         |     child-context-1       child-context-2      |
         |            |                     |             |                      server
 parent-context-1-----x                     x-----parent-context-2
         |                                                |
 (MqConfigS::server)                 (example: MqConfigS::server --fork --uds … --file …)
         |                                                |
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         |                                                |
      (--tcp)                                  (--pipe, --uds, --tcp)
         |                                                |
 parent-context-1-----x                     x-----parent-context-2
         |            |                     |             |                      client
         |     child-context-1       child-context-2      |
         |            |                     |             |
         x------------x--------client-------x-------------x

                           !on local host!

Definition of a "client-context"

Definition of a "server-context"

client --tcp --host REMOTE_HOST --port REMOTE_PORT ... or
client --uds --file MYFILE ...

Definition of a "parent-context"

Definition of a "child-context"

Function Documentation

◆ LinkCheckOptionI32()

void ccmqmsgque::MqContextC::LinkCheckOptionI32 ( MK_STRN opt,
MK_I32 * val )

C++: ctx.LinkCreate(MkBufferListC* args = NULL) C-API
make ctx to a parent-context and setup a new client-server-link

C++: ctx.LinkCreateChild(MqContextC* parent, MkBufferListC* args = NULL) C-API
make a context to a child-context on-top of an existing parent-client-server-link

Definition at line 158 of file LibMqMsgque_cc.cc.

158 {
160 ErrorCheck (MkBufferListCheckOptionI32 (reinterpret_cast<MQ_CTX>(hdl)->link.alfa, opt, 0, true, val));
161 }
#define MkBufferListCheckOptionI32(...)
void ErrorCheck(enum MkErrorE err, MK_STRN const caller=__builtin_FUNCTION(), MK_I32 const line=__builtin_LINE()) const
#define MkRtSetup_NULL
struct MqContextS * MQ_CTX
class-shortcut for struct MqContextS *, all shortcut using the XX_YYY syntax (only for public API) …
+ Here is the caller graph for this function:

◆ LinkConnect()

void ccmqmsgque::MqContextC::LinkConnect ( )
inline

C++: ctx.LinkConnect() C-API
re-connect a client-server-link after a server crash or a network downtime …

Definition at line 758 of file MqContextC_inline_cc.hh.

758 {
759 MK_UNUSED auto ctx = getCTX();
760 enum MkErrorE errVal = MqLinkConnect(ctx);
761 MkErrorC_Check(ctx, errVal);
762 }
#define MK_UNUSED
MQ_CTX getCTX() const
return the LibMsgqueObject from current MqContextC instance

◆ LinkCreate() [1/2]

void ccmqmsgque::MqContextC::LinkCreate ( const MkBufferListC & args)
inline

C++: ctx.LinkCreate(MkBufferListC* args = NULL) C-API
make ctx to a parent-context and setup a new client-server-link

Definition at line 773 of file MqContextC_inline_cc.hh.

773 {
774 MK_UNUSED auto ctx = getCTX();
775 const MK_BAC args_hdl = MkBufferListC::getBFL(args);
776 enum MkErrorE errVal = MqLinkCreate(ctx, args_hdl);
777 MkErrorC_Check(ctx, errVal);
778 }
struct MkBufferListS * MK_BAC

◆ LinkCreate() [2/2]

void ccmqmsgque::MqContextC::LinkCreate ( MkBufferListC * args = NULL)
inline

C++: ctx.LinkCreate(MkBufferListC* args = NULL) C-API
make ctx to a parent-context and setup a new client-server-link

Definition at line 765 of file MqContextC_inline_cc.hh.

765 {
766 MK_UNUSED auto ctx = getCTX();
768 enum MkErrorE errVal = MqLinkCreate(ctx, args_hdl);
769 MkErrorC_Check(ctx, errVal);
770 }
MK_BFL getBFL__null_allow() const
+ Here is the caller graph for this function:

◆ LinkCreateChild() [1/2]

void ccmqmsgque::MqContextC::LinkCreateChild ( const MqContextC & parent,
const MkBufferListC & args )
inline

C++: ctx.LinkCreateChild(MqContextC* parent, MkBufferListC* args = NULL) C-API
make a context to a child-context on-top of an existing parent-client-server-link

Definition at line 790 of file MqContextC_inline_cc.hh.

790 {
791 MK_UNUSED auto ctx = getCTX();
792 const MQ_CTX parent_hdl = MqContextC::getCTX(parent);
793 const MK_BAC args_hdl = MkBufferListC::getBFL(args);
794 enum MkErrorE errVal = MqLinkCreateChild(ctx, parent_hdl, args_hdl);
795 MkErrorC_Check(ctx, errVal);
796 }

◆ LinkCreateChild() [2/2]

void ccmqmsgque::MqContextC::LinkCreateChild ( MqContextC * parent,
MkBufferListC * args = NULL )
inline

C++: ctx.LinkCreateChild(MqContextC* parent, MkBufferListC* args = NULL) C-API
make a context to a child-context on-top of an existing parent-client-server-link

Definition at line 781 of file MqContextC_inline_cc.hh.

781 {
782 MK_UNUSED auto ctx = getCTX();
783 MQ_CTX parent_hdl = MqContextC::getCTX(parent);
785 enum MkErrorE errVal = MqLinkCreateChild(ctx, parent_hdl, args_hdl);
786 MkErrorC_Check(ctx, errVal);
787 }

◆ LinkDelete()

void ccmqmsgque::MqContextC::LinkDelete ( )
inline

C++: ctx.LinkDelete() C-API
close the client-server-link

Definition at line 799 of file MqContextC_inline_cc.hh.

799 {
800 MK_UNUSED auto ctx = getCTX();
801 MqLinkDelete(ctx);
802 }

◆ LinkGetCtxId()

MK_NUM ccmqmsgque::MqContextC::LinkGetCtxId ( )
inline

C++: MK_NUM ctx.LinkGetCtxId() C-API
get an identifier which is unique per parent-or-child-context

Definition at line 805 of file MqContextC_inline_cc.hh.

805 {
806 MK_UNUSED auto ctx = getCTX();
807 MK_NUM __retVal__L = MqLinkGetCtxId(ctx);
808 return __retVal__L;
809 }
int32_t MK_NUM

◆ LinkGetParent()

MqContextC * ccmqmsgque::MqContextC::LinkGetParent ( )
inline

C++: MqContextC* ctx.LinkGetParent() C-API
get the initial parent-context from a client/server link …

Definition at line 749 of file MqContextC_inline_cc.hh.

749 {
750 MK_UNUSED auto ctx = getCTX();
751 MQ_CTX __retVal__L = MqLinkGetParent(ctx);
752 return MqContextC::MqContextC_ObjNew(MK_RT_CALL __retVal__L);
753 }
#define MK_RT_CALL
static MqContextC * MqContextC_ObjNew(MK_RT_ARGS MQ_CTX hdl)
return MqContextC from LibMsgqueObject

◆ LinkGetTargetIdent()

MK_STRN ccmqmsgque::MqContextC::LinkGetTargetIdent ( )
inline

C++: MK_STRN ctx.LinkGetTargetIdent() C-API
get the ident of the link-target

Definition at line 812 of file MqContextC_inline_cc.hh.

812 {
813 MK_UNUSED auto ctx = getCTX();
814 MK_STRN __retVal__L = MqLinkGetTargetIdent(ctx);
815 return __retVal__L;
816 }
const MK_STRB * MK_STRN

◆ LinkIsConnected()

MK_BOOL ccmqmsgque::MqContextC::LinkIsConnected ( )
inline

C++: MK_BOOL ctx.LinkIsConnected() C-API
is the context connected? …

Definition at line 819 of file MqContextC_inline_cc.hh.

819 {
820 MK_UNUSED auto ctx = getCTX();
821 MK_BOOL __retVal__L = MqLinkIsConnected(ctx);
822 return __retVal__L;
823 }

◆ LinkIsParent()

MK_BOOL ccmqmsgque::MqContextC::LinkIsParent ( )
inline

C++: MK_BOOL ctx.LinkIsParent() C-API
is the context a parent-context? …

Definition at line 826 of file MqContextC_inline_cc.hh.

826 {
827 MK_UNUSED auto ctx = getCTX();
828 MK_BOOL __retVal__L = MqLinkIsParent(ctx);
829 return __retVal__L;
830 }

◆ LinkShutdown()

void ccmqmsgque::MqContextC::LinkShutdown ( )
inline

C++: ctx.LinkShutdown() C-API
shutdown the communication with a server

Definition at line 833 of file MqContextC_inline_cc.hh.

833 {
834 MK_UNUSED auto ctx = getCTX();
835 enum MkErrorE errVal = MqLinkShutdown(ctx);
836 MkErrorC_Check(ctx, errVal);
837 }