theLink 10.0
Loading...
Searching...
No Matches
MqContextC_Link_RB_API

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

+ Collaboration diagram for MqContextC_Link_RB_API:

Functions

static OT_ProcRet rbmqmsgque_MqContextC_LinkGetParent (MqContextC_ARGS)
  Ruby: MqContextC ctx.LinkGetParent() C-API
get the initial parent-context from a client/server link …
 
static OT_ProcRet rbmqmsgque_MqContextC_LinkConnect (MqContextC_ARGS)
  Ruby: ctx.LinkConnect() C-API
re-connect a client-server-link after a server crash or a network downtime …
 
static OT_ProcRet rbmqmsgque_MqContextC_LinkCreate (MqContextC_ARGS)
  Ruby: ctx.LinkCreate(?args:MkBufferListC...=nil?) C-API
make ctx to a parent-context and setup a new client-server-link
 
static OT_ProcRet rbmqmsgque_MqContextC_LinkCreateChild (MqContextC_ARGS)
  Ruby: ctx.LinkCreateChild(parent:MqContextC, ?args:MkBufferListC...=nil?) C-API
make a context to a child-context on-top of an existing parent-client-server-link
 
static OT_ProcRet rbmqmsgque_MqContextC_LinkDelete (MqContextC_ARGS)
  Ruby: ctx.LinkDelete() C-API
close the client-server-link
 
static OT_ProcRet rbmqmsgque_MqContextC_LinkGetCtxId (MqContextC_ARGS)
  Ruby: int32 ctx.LinkGetCtxId() C-API
get an identifier which is unique per parent-or-child-context
 
static OT_ProcRet rbmqmsgque_MqContextC_LinkGetTargetIdent (MqContextC_ARGS)
  Ruby: string ctx.LinkGetTargetIdent() C-API
get the ident of the link-target
 
static OT_ProcRet rbmqmsgque_MqContextC_LinkIsConnected (MqContextC_ARGS)
  Ruby: bool ctx.LinkIsConnected() C-API
is the context connected? …
 
static OT_ProcRet rbmqmsgque_MqContextC_LinkIsParent (MqContextC_ARGS)
  Ruby: bool ctx.LinkIsParent() C-API
is the context a parent-context? …
 
static OT_ProcRet rbmqmsgque_MqContextC_LinkShutdown (MqContextC_ARGS)
  Ruby: ctx.LinkShutdown() C-API
shutdown the communication with a server
 

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"

Function Documentation

◆ rbmqmsgque_MqContextC_LinkConnect()

static OT_ProcRet rbmqmsgque_MqContextC_LinkConnect ( MqContextC_ARGS )
static

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

Definition at line 1219 of file MqContextC_rb.c.

1219 {
1223 MkErrorC_Check(hdl,MqLinkConnect (hdl));
1225 end: MK_UNUSED /* LONG JUMP on error */
1227}
#define OT_SETUP_NOARG(d)
#define OT_retObj_SET_None
#define OT_retObj_RETURN
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_SETUP_hdl
#define LinkConnect_doc
#define MK_UNUSED

◆ rbmqmsgque_MqContextC_LinkCreate()

static OT_ProcRet rbmqmsgque_MqContextC_LinkCreate ( MqContextC_ARGS )
static

Ruby: ctx.LinkCreate(?args:MkBufferListC...=nil?) C-API
make ctx to a parent-context and setup a new client-server-link

Definition at line 1230 of file MqContextC_rb.c.

1230 {
1233 MkBufferListCreateTLS_T(args,10);
1236 MkErrorC_Check(hdl,MqLinkCreate (hdl, args));
1238 end: MK_UNUSED /* LONG JUMP on error */
1240}
#define OT_SETUP_VARARGS(min, max, d)
#define OT_CHECK_OPTIONAL(val)
#define LinkCreate_doc
#define MkBufferListCreateTLS_T(name, num)
#define OT_CHECK_BAC(val)

◆ rbmqmsgque_MqContextC_LinkCreateChild()

static OT_ProcRet rbmqmsgque_MqContextC_LinkCreateChild ( MqContextC_ARGS )
static

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

Definition at line 1243 of file MqContextC_rb.c.

1243 {
1246 MQ_CTX parent = 0;
1248 MkBufferListCreateTLS_T(args,10);
1251 MkErrorC_Check(hdl,MqLinkCreateChild (hdl, parent, args));
1253 end: MK_UNUSED /* LONG JUMP on error */
1255}
#define OT_CHECK_REQUIRED(val)
#define LinkCreateChild_doc
#define MK_NULL_NO
#define OT_CHECK_CTX(val, nullB)
PUBLIC data structure for the rbmqmsgque-specific-data

◆ rbmqmsgque_MqContextC_LinkDelete()

static OT_ProcRet rbmqmsgque_MqContextC_LinkDelete ( MqContextC_ARGS )
static

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

Definition at line 1258 of file MqContextC_rb.c.

1258 {
1262 MqLinkDelete (hdl);
1264 end: MK_UNUSED /* LONG JUMP on error */
1266}
#define LinkDelete_doc

◆ rbmqmsgque_MqContextC_LinkGetCtxId()

static OT_ProcRet rbmqmsgque_MqContextC_LinkGetCtxId ( MqContextC_ARGS )
static

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

Definition at line 1269 of file MqContextC_rb.c.

1269 {
1274 end: MK_UNUSED /* LONG JUMP on error */
1276}
#define OT_retObj_SET_I32(nat)
#define LinkGetCtxId_doc

◆ rbmqmsgque_MqContextC_LinkGetParent()

static OT_ProcRet rbmqmsgque_MqContextC_LinkGetParent ( MqContextC_ARGS )
static

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

Definition at line 1206 of file MqContextC_rb.c.

1206 {
1210 MQ_CTX retVal = MqLinkGetParent (hdl);
1211 OT_retObj_SET_CTX(retVal);
1212 end: MK_UNUSED /* LONG JUMP on error */
1214}
#define OT_retObj_SET_CTX(nat)
#define LinkGetParent_doc

◆ rbmqmsgque_MqContextC_LinkGetTargetIdent()

static OT_ProcRet rbmqmsgque_MqContextC_LinkGetTargetIdent ( MqContextC_ARGS )
static

Ruby: string ctx.LinkGetTargetIdent() C-API
get the ident of the link-target

Definition at line 1279 of file MqContextC_rb.c.

1279 {
1284 end: MK_UNUSED /* LONG JUMP on error */
1286}
#define OT_retObj_SET_STR(nat)
#define LinkGetTargetIdent_doc

◆ rbmqmsgque_MqContextC_LinkIsConnected()

static OT_ProcRet rbmqmsgque_MqContextC_LinkIsConnected ( MqContextC_ARGS )
static

Ruby: bool ctx.LinkIsConnected() C-API
is the context connected? …

Definition at line 1289 of file MqContextC_rb.c.

1289 {
1294 end: MK_UNUSED /* LONG JUMP on error */
1296}
#define OT_retObj_SET_BOL(nat)
#define LinkIsConnected_doc

◆ rbmqmsgque_MqContextC_LinkIsParent()

static OT_ProcRet rbmqmsgque_MqContextC_LinkIsParent ( MqContextC_ARGS )
static

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

Definition at line 1299 of file MqContextC_rb.c.

1299 {
1304 end: MK_UNUSED /* LONG JUMP on error */
1306}
#define LinkIsParent_doc

◆ rbmqmsgque_MqContextC_LinkShutdown()

static OT_ProcRet rbmqmsgque_MqContextC_LinkShutdown ( MqContextC_ARGS )
static

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

Definition at line 1309 of file MqContextC_rb.c.

1309 {
1313 MkErrorC_Check(hdl,MqLinkShutdown (hdl));
1315 end: MK_UNUSED /* LONG JUMP on error */
1317}
#define LinkShutdown_doc