theLink 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - cs - py - rb - jv - cc
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 1462 of file MqContextC_py.c.

1462 {
1464 OT_SETUP_NOARG(LinkConnect_doc)
1465 OT_CHECK_NOARGS
1466 MkErrorC_Check(hdl,MqLinkConnect (hdl));
1467 OT_retObj_SET_None
1468 goto end;
1469 error:
1470 OT_retObj_SET_Error
1471 end:
1473}
#define OT_SETUP_hdl
#define LinkConnect_doc
#define OT_retObj_RETURN
#define error

◆ 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 1476 of file MqContextC_py.c.

1476 {
1478 OT_SETUP_VARARGS(0,99,LinkCreate_doc)
1479 MkBufferListCreateTLS_T(args,10);
1480 OT_CHECK_OPTIONAL(OT_CHECK_BAC (args))
1481 OT_CHECK_NOARGS
1482 MkErrorC_Check(hdl,MqLinkCreate (hdl, args));
1483 OT_retObj_SET_None
1484 goto end;
1485 error:
1486 OT_retObj_SET_Error
1487 end:
1489}
#define LinkCreate_doc
#define MkBufferListCreateTLS_T(name, num)

◆ 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 1492 of file MqContextC_py.c.

1492 {
1494 OT_SETUP_VARARGS(1,99,LinkCreateChild_doc)
1495 MQ_CTX parent = 0;
1496 OT_CHECK_REQUIRED(OT_CHECK_CTX (parent,MK_NULL_NO))
1497 MkBufferListCreateTLS_T(args,10);
1498 OT_CHECK_OPTIONAL(OT_CHECK_BAC (args))
1499 OT_CHECK_NOARGS
1500 MkErrorC_Check(hdl,MqLinkCreateChild (hdl, parent, args));
1501 OT_retObj_SET_None
1502 goto end;
1503 error:
1504 OT_retObj_SET_Error
1505 end:
1507}
#define LinkCreateChild_doc
#define MK_NULL_NO
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 1510 of file MqContextC_py.c.

1510 {
1512 OT_SETUP_NOARG(LinkDelete_doc)
1513 OT_CHECK_NOARGS
1514 MqLinkDelete (hdl);
1515 OT_retObj_SET_None
1516 goto end;
1517 error:
1518 OT_retObj_SET_Error
1519 end:
1521}
#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 1524 of file MqContextC_py.c.

1524 {
1526 OT_SETUP_NOARG(LinkGetCtxId_doc)
1527 OT_CHECK_NOARGS
1528 OT_retObj_SET_I32(MqLinkGetCtxId (hdl))
1529 goto end;
1530 error:
1531 OT_retObj_SET_Error
1532 end:
1534}
#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 1446 of file MqContextC_py.c.

1446 {
1448 OT_SETUP_NOARG(LinkGetParent_doc)
1449 OT_CHECK_NOARGS
1450 MQ_CTX retVal = MqLinkGetParent (hdl);
1451 OT_retObj_SET_CTX(retVal)
1452 goto end;
1453 error:
1454 OT_retObj_SET_Error
1455 end:
1457}
#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 1537 of file MqContextC_py.c.

1537 {
1539 OT_SETUP_NOARG(LinkGetTargetIdent_doc)
1540 OT_CHECK_NOARGS
1541 OT_retObj_SET_STR(MqLinkGetTargetIdent (hdl))
1542 goto end;
1543 error:
1544 OT_retObj_SET_Error
1545 end:
1547}
#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 1550 of file MqContextC_py.c.

1550 {
1552 OT_SETUP_NOARG(LinkIsConnected_doc)
1553 OT_CHECK_NOARGS
1554 OT_retObj_SET_BOL(MqLinkIsConnected (hdl))
1555 goto end;
1556 error:
1557 OT_retObj_SET_Error
1558 end:
1560}
#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 1563 of file MqContextC_py.c.

1563 {
1565 OT_SETUP_NOARG(LinkIsParent_doc)
1566 OT_CHECK_NOARGS
1567 OT_retObj_SET_BOL(MqLinkIsParent (hdl))
1568 goto end;
1569 error:
1570 OT_retObj_SET_Error
1571 end:
1573}
#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 1576 of file MqContextC_py.c.

1576 {
1578 OT_SETUP_NOARG(LinkShutdown_doc)
1579 OT_CHECK_NOARGS
1580 MkErrorC_Check(hdl,MqLinkShutdown (hdl));
1581 OT_retObj_SET_None
1582 goto end;
1583 error:
1584 OT_retObj_SET_Error
1585 end:
1587}
#define LinkShutdown_doc