theLink 10.0
Loading...
Searching...
No Matches
MqContextC_Link_PY_API

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

+ Collaboration diagram for MqContextC_Link_PY_API:

Functions

static OT_ProcRet pymqmsgque_MqContextC_LinkGetParent (MqContextC_ARGS)
  Python: MqContextC ctx.LinkGetParent() C-API
get the initial parent-context from a client/server link …
 
static OT_ProcRet pymqmsgque_MqContextC_LinkConnect (MqContextC_ARGS)
  Python: ctx.LinkConnect() C-API
re-connect a client-server-link after a server crash or a network downtime …
 
static OT_ProcRet pymqmsgque_MqContextC_LinkCreate (MqContextC_ARGS)
  Python: ctx.LinkCreate(?args:MkBufferListC...=None?) C-API
make ctx to a parent-context and setup a new client-server-link
 
static OT_ProcRet pymqmsgque_MqContextC_LinkCreateChild (MqContextC_ARGS)
  Python: ctx.LinkCreateChild(parent:MqContextC, ?args:MkBufferListC...=None?) C-API
make a context to a child-context on-top of an existing parent-client-server-link
 
static OT_ProcRet pymqmsgque_MqContextC_LinkDelete (MqContextC_ARGS)
  Python: ctx.LinkDelete() C-API
close the client-server-link
 
static OT_ProcRet pymqmsgque_MqContextC_LinkGetCtxId (MqContextC_ARGS)
  Python: int32 ctx.LinkGetCtxId() C-API
get an identifier which is unique per parent-or-child-context
 
static OT_ProcRet pymqmsgque_MqContextC_LinkGetTargetIdent (MqContextC_ARGS)
  Python: string ctx.LinkGetTargetIdent() C-API
get the ident of the link-target
 
static OT_ProcRet pymqmsgque_MqContextC_LinkIsConnected (MqContextC_ARGS)
  Python: bool ctx.LinkIsConnected() C-API
is the context connected? …
 
static OT_ProcRet pymqmsgque_MqContextC_LinkIsParent (MqContextC_ARGS)
  Python: bool ctx.LinkIsParent() C-API
is the context a parent-context? …
 
static OT_ProcRet pymqmsgque_MqContextC_LinkShutdown (MqContextC_ARGS)
  Python: 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

◆ pymqmsgque_MqContextC_LinkConnect()

static OT_ProcRet pymqmsgque_MqContextC_LinkConnect ( MqContextC_ARGS )
static

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

Definition at line 1461 of file MqContextC_py.c.

1461 {
1465 MkErrorC_Check(hdl,MqLinkConnect (hdl));
1467 goto end;
1468 error:
1470 end:
1472}
#define OT_SETUP_NOARG(d)
#define OT_retObj_SET_Error
#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 error
Definition high_lng.h:339

◆ pymqmsgque_MqContextC_LinkCreate()

static OT_ProcRet pymqmsgque_MqContextC_LinkCreate ( MqContextC_ARGS )
static

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

Definition at line 1475 of file MqContextC_py.c.

1475 {
1478 MkBufferListCreateTLS_T(args,10);
1481 MkErrorC_Check(hdl,MqLinkCreate (hdl, args));
1483 goto end;
1484 error:
1486 end:
1488}
#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)

◆ pymqmsgque_MqContextC_LinkCreateChild()

static OT_ProcRet pymqmsgque_MqContextC_LinkCreateChild ( MqContextC_ARGS )
static

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

Definition at line 1491 of file MqContextC_py.c.

1491 {
1494 MQ_CTX parent = 0;
1496 MkBufferListCreateTLS_T(args,10);
1499 MkErrorC_Check(hdl,MqLinkCreateChild (hdl, parent, args));
1501 goto end;
1502 error:
1504 end:
1506}
#define OT_CHECK_REQUIRED(val)
#define LinkCreateChild_doc
#define MK_NULL_NO
#define OT_CHECK_CTX(val, nullB)
PUBLIC data structure for the pymqmsgque-specific-data

◆ pymqmsgque_MqContextC_LinkDelete()

static OT_ProcRet pymqmsgque_MqContextC_LinkDelete ( MqContextC_ARGS )
static

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

Definition at line 1509 of file MqContextC_py.c.

1509 {
1513 MqLinkDelete (hdl);
1515 goto end;
1516 error:
1518 end:
1520}
#define LinkDelete_doc

◆ pymqmsgque_MqContextC_LinkGetCtxId()

static OT_ProcRet pymqmsgque_MqContextC_LinkGetCtxId ( MqContextC_ARGS )
static

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

Definition at line 1523 of file MqContextC_py.c.

1523 {
1528 goto end;
1529 error:
1531 end:
1533}
#define OT_retObj_SET_I32(nat)
#define LinkGetCtxId_doc

◆ pymqmsgque_MqContextC_LinkGetParent()

static OT_ProcRet pymqmsgque_MqContextC_LinkGetParent ( MqContextC_ARGS )
static

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

Definition at line 1445 of file MqContextC_py.c.

1445 {
1449 MQ_CTX retVal = MqLinkGetParent (hdl);
1450 OT_retObj_SET_CTX(retVal);
1451 goto end;
1452 error:
1454 end:
1456}
#define OT_retObj_SET_CTX(nat)
#define LinkGetParent_doc

◆ pymqmsgque_MqContextC_LinkGetTargetIdent()

static OT_ProcRet pymqmsgque_MqContextC_LinkGetTargetIdent ( MqContextC_ARGS )
static

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

Definition at line 1536 of file MqContextC_py.c.

1536 {
1541 goto end;
1542 error:
1544 end:
1546}
#define OT_retObj_SET_STR(nat)
#define LinkGetTargetIdent_doc

◆ pymqmsgque_MqContextC_LinkIsConnected()

static OT_ProcRet pymqmsgque_MqContextC_LinkIsConnected ( MqContextC_ARGS )
static

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

Definition at line 1549 of file MqContextC_py.c.

1549 {
1554 goto end;
1555 error:
1557 end:
1559}
#define OT_retObj_SET_BOL(nat)
#define LinkIsConnected_doc

◆ pymqmsgque_MqContextC_LinkIsParent()

static OT_ProcRet pymqmsgque_MqContextC_LinkIsParent ( MqContextC_ARGS )
static

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

Definition at line 1562 of file MqContextC_py.c.

1562 {
1567 goto end;
1568 error:
1570 end:
1572}
#define LinkIsParent_doc

◆ pymqmsgque_MqContextC_LinkShutdown()

static OT_ProcRet pymqmsgque_MqContextC_LinkShutdown ( MqContextC_ARGS )
static

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

Definition at line 1575 of file MqContextC_py.c.

1575 {
1579 MkErrorC_Check(hdl,MqLinkShutdown (hdl));
1581 goto end;
1582 error:
1584 end:
1586}
#define LinkShutdown_doc