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 py_mqmsgque_MqContextC_LinkGetParent (MqContextC_ARGS)
  Python: MqContextC ctx.LinkGetParent() C-API
get the initial parent-context from a client/server link …
 
static OT_ProcRet py_mqmsgque_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 py_mqmsgque_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 py_mqmsgque_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 py_mqmsgque_MqContextC_LinkDelete (MqContextC_ARGS)
  Python: ctx.LinkDelete() C-API
close the client-server-link
 
static OT_ProcRet py_mqmsgque_MqContextC_LinkGetCtxId (MqContextC_ARGS)
  Python: int32 ctx.LinkGetCtxId() C-API
get an identifier which is unique per parent-or-child-context
 
static OT_ProcRet py_mqmsgque_MqContextC_LinkGetTargetIdent (MqContextC_ARGS)
  Python: string ctx.LinkGetTargetIdent() C-API
get the ident of the link-target
 
static OT_ProcRet py_mqmsgque_MqContextC_LinkIsConnected (MqContextC_ARGS)
  Python: bool ctx.LinkIsConnected() C-API
is the context connected? …
 
static OT_ProcRet py_mqmsgque_MqContextC_LinkIsParent (MqContextC_ARGS)
  Python: bool ctx.LinkIsParent() C-API
is the context a parent-context? …
 
static OT_ProcRet py_mqmsgque_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

◆ py_mqmsgque_MqContextC_LinkConnect()

static OT_ProcRet py_mqmsgque_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 1452 of file MqContextC_py.c.

1452 {
1454 OT_SETUP_NOARG(LinkConnect_doc)
1455 OT_CHECK_NOARGS
1456 MkErrorC_Check(hdl,MqLinkConnect (hdl));
1457 OT_retObj_SET_None
1458 goto end;
1459 error:
1460 OT_retObj_SET_Error
1461 end:
1463}
#define OT_SETUP_hdl
#define LinkConnect_doc
#define OT_retObj_RETURN
#define error

◆ py_mqmsgque_MqContextC_LinkCreate()

static OT_ProcRet py_mqmsgque_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 1466 of file MqContextC_py.c.

1466 {
1468 OT_SETUP_VARARGS(0,99,LinkCreate_doc)
1469 MkBufferListCreateTLS_T(args,10);
1470 OT_CHECK_OPTIONAL(OT_CHECK_BAC (args))
1471 OT_CHECK_NOARGS
1472 MkErrorC_Check(hdl,MqLinkCreate (hdl, args));
1473 OT_retObj_SET_None
1474 goto end;
1475 error:
1476 OT_retObj_SET_Error
1477 end:
1479}
#define LinkCreate_doc
#define MkBufferListCreateTLS_T(name, num)

◆ py_mqmsgque_MqContextC_LinkCreateChild()

static OT_ProcRet py_mqmsgque_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 1482 of file MqContextC_py.c.

1482 {
1484 OT_SETUP_VARARGS(1,99,LinkCreateChild_doc)
1485 MQ_CTX parent = 0;
1486 OT_CHECK_REQUIRED(OT_CHECK_CTX (parent,MK_NULL_NO))
1487 MkBufferListCreateTLS_T(args,10);
1488 OT_CHECK_OPTIONAL(OT_CHECK_BAC (args))
1489 OT_CHECK_NOARGS
1490 MkErrorC_Check(hdl,MqLinkCreateChild (hdl, parent, args));
1491 OT_retObj_SET_None
1492 goto end;
1493 error:
1494 OT_retObj_SET_Error
1495 end:
1497}
#define LinkCreateChild_doc
#define MK_NULL_NO
PUBLIC data structure for the pymqmsgque-specific-data

◆ py_mqmsgque_MqContextC_LinkDelete()

static OT_ProcRet py_mqmsgque_MqContextC_LinkDelete ( MqContextC_ARGS )
static

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

Definition at line 1500 of file MqContextC_py.c.

1500 {
1502 OT_SETUP_NOARG(LinkDelete_doc)
1503 OT_CHECK_NOARGS
1504 MqLinkDelete (hdl);
1505 OT_retObj_SET_None
1506 goto end;
1507 error:
1508 OT_retObj_SET_Error
1509 end:
1511}
#define LinkDelete_doc

◆ py_mqmsgque_MqContextC_LinkGetCtxId()

static OT_ProcRet py_mqmsgque_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 1514 of file MqContextC_py.c.

1514 {
1516 OT_SETUP_NOARG(LinkGetCtxId_doc)
1517 OT_CHECK_NOARGS
1518 OT_retObj_SET_I32(MqLinkGetCtxId (hdl))
1519 goto end;
1520 error:
1521 OT_retObj_SET_Error
1522 end:
1524}
#define LinkGetCtxId_doc

◆ py_mqmsgque_MqContextC_LinkGetParent()

static OT_ProcRet py_mqmsgque_MqContextC_LinkGetParent ( MqContextC_ARGS )
static

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

Definition at line 1436 of file MqContextC_py.c.

1436 {
1438 OT_SETUP_NOARG(LinkGetParent_doc)
1439 OT_CHECK_NOARGS
1440 MQ_CTX retVal = MqLinkGetParent (hdl);
1441 OT_retObj_SET_CTX(retVal)
1442 goto end;
1443 error:
1444 OT_retObj_SET_Error
1445 end:
1447}
#define LinkGetParent_doc

◆ py_mqmsgque_MqContextC_LinkGetTargetIdent()

static OT_ProcRet py_mqmsgque_MqContextC_LinkGetTargetIdent ( MqContextC_ARGS )
static

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

Definition at line 1527 of file MqContextC_py.c.

1527 {
1529 OT_SETUP_NOARG(LinkGetTargetIdent_doc)
1530 OT_CHECK_NOARGS
1531 OT_retObj_SET_STR(MqLinkGetTargetIdent (hdl))
1532 goto end;
1533 error:
1534 OT_retObj_SET_Error
1535 end:
1537}
#define LinkGetTargetIdent_doc

◆ py_mqmsgque_MqContextC_LinkIsConnected()

static OT_ProcRet py_mqmsgque_MqContextC_LinkIsConnected ( MqContextC_ARGS )
static

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

Definition at line 1540 of file MqContextC_py.c.

1540 {
1542 OT_SETUP_NOARG(LinkIsConnected_doc)
1543 OT_CHECK_NOARGS
1544 OT_retObj_SET_BOL(MqLinkIsConnected (hdl))
1545 goto end;
1546 error:
1547 OT_retObj_SET_Error
1548 end:
1550}
#define LinkIsConnected_doc

◆ py_mqmsgque_MqContextC_LinkIsParent()

static OT_ProcRet py_mqmsgque_MqContextC_LinkIsParent ( MqContextC_ARGS )
static

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

Definition at line 1553 of file MqContextC_py.c.

1553 {
1555 OT_SETUP_NOARG(LinkIsParent_doc)
1556 OT_CHECK_NOARGS
1557 OT_retObj_SET_BOL(MqLinkIsParent (hdl))
1558 goto end;
1559 error:
1560 OT_retObj_SET_Error
1561 end:
1563}
#define LinkIsParent_doc

◆ py_mqmsgque_MqContextC_LinkShutdown()

static OT_ProcRet py_mqmsgque_MqContextC_LinkShutdown ( MqContextC_ARGS )
static

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

Definition at line 1566 of file MqContextC_py.c.

1566 {
1568 OT_SETUP_NOARG(LinkShutdown_doc)
1569 OT_CHECK_NOARGS
1570 MkErrorC_Check(hdl,MqLinkShutdown (hdl));
1571 OT_retObj_SET_None
1572 goto end;
1573 error:
1574 OT_retObj_SET_Error
1575 end:
1577}
#define LinkShutdown_doc