theLink 10.0
Loading...
Searching...
No Matches
MqContextC_Link_TCL_API

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

+ Collaboration diagram for MqContextC_Link_TCL_API:

Functions

static OT_ProcRet tclmqmsgque_MqContextC_LinkGetParent (MqContextC_ARGS)
  Tcl: MqContextC [$ctx LinkGetParent] C-API
get the initial parent-context from a client/server link …
 
static OT_ProcRet tclmqmsgque_MqContextC_LinkConnect (MqContextC_ARGS)
  Tcl: $ctx LinkConnect C-API
re-connect a client-server-link after a server crash or a network downtime …
 
static OT_ProcRet tclmqmsgque_MqContextC_LinkCreate (MqContextC_ARGS)
  Tcl: $ctx LinkCreate ?args:MkBufferListC...="MK_NULL"? C-API
make ctx to a parent-context and setup a new client-server-link
 
static OT_ProcRet tclmqmsgque_MqContextC_LinkCreateChild (MqContextC_ARGS)
  Tcl: $ctx LinkCreateChild parent:MqContextC ?args:MkBufferListC...="MK_NULL"? C-API
make a context to a child-context on-top of an existing parent-client-server-link
 
static OT_ProcRet tclmqmsgque_MqContextC_LinkDelete (MqContextC_ARGS)
  Tcl: $ctx LinkDelete C-API
close the client-server-link
 
static OT_ProcRet tclmqmsgque_MqContextC_LinkGetCtxId (MqContextC_ARGS)
  Tcl: int32 [$ctx LinkGetCtxId] C-API
get an identifier which is unique per parent-or-child-context
 
static OT_ProcRet tclmqmsgque_MqContextC_LinkGetTargetIdent (MqContextC_ARGS)
  Tcl: string [$ctx LinkGetTargetIdent] C-API
get the ident of the link-target
 
static OT_ProcRet tclmqmsgque_MqContextC_LinkIsConnected (MqContextC_ARGS)
  Tcl: bool [$ctx LinkIsConnected] C-API
is the context connected? …
 
static OT_ProcRet tclmqmsgque_MqContextC_LinkIsParent (MqContextC_ARGS)
  Tcl: bool [$ctx LinkIsParent] C-API
is the context a parent-context? …
 
static OT_ProcRet tclmqmsgque_MqContextC_LinkShutdown (MqContextC_ARGS)
  Tcl: $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

◆ tclmqmsgque_MqContextC_LinkConnect()

static OT_ProcRet tclmqmsgque_MqContextC_LinkConnect ( MqContextC_ARGS )
static

Tcl: $ctx LinkConnect C-API
re-connect a client-server-link after a server crash or a network downtime …

Definition at line 1514 of file MqContextC_tcl.c.

1514 {
1518 MkErrorC_Check(hdl,MqLinkConnect (hdl));
1520 goto end;
1521 error:
1523 end:
1525}
#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

◆ tclmqmsgque_MqContextC_LinkCreate()

static OT_ProcRet tclmqmsgque_MqContextC_LinkCreate ( MqContextC_ARGS )
static

Tcl: $ctx LinkCreate ?args:MkBufferListC...="MK_NULL"? C-API
make ctx to a parent-context and setup a new client-server-link

Definition at line 1528 of file MqContextC_tcl.c.

1528 {
1531 MkBufferListCreateTLS_T(args,10);
1534 MkErrorC_Check(hdl,MqLinkCreate (hdl, args));
1536 goto end;
1537 error:
1539 end:
1541}
#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)

◆ tclmqmsgque_MqContextC_LinkCreateChild()

static OT_ProcRet tclmqmsgque_MqContextC_LinkCreateChild ( MqContextC_ARGS )
static

Tcl: $ctx LinkCreateChild parent:MqContextC ?args:MkBufferListC...="MK_NULL"? C-API
make a context to a child-context on-top of an existing parent-client-server-link

Definition at line 1544 of file MqContextC_tcl.c.

1544 {
1547 MQ_CTX parent = 0;
1549 MkBufferListCreateTLS_T(args,10);
1552 MkErrorC_Check(hdl,MqLinkCreateChild (hdl, parent, args));
1554 goto end;
1555 error:
1557 end:
1559}
#define OT_CHECK_REQUIRED(val)
#define LinkCreateChild_doc
#define MK_NULL_NO
#define OT_CHECK_CTX(val, nullB)
PUBLIC data structure for the tclmqmsgque-specific-data

◆ tclmqmsgque_MqContextC_LinkDelete()

static OT_ProcRet tclmqmsgque_MqContextC_LinkDelete ( MqContextC_ARGS )
static

Tcl: $ctx LinkDelete C-API
close the client-server-link

Definition at line 1562 of file MqContextC_tcl.c.

1562 {
1566 MqLinkDelete (hdl);
1568 goto end;
1569 error:
1571 end:
1573}
#define LinkDelete_doc

◆ tclmqmsgque_MqContextC_LinkGetCtxId()

static OT_ProcRet tclmqmsgque_MqContextC_LinkGetCtxId ( MqContextC_ARGS )
static

Tcl: int32 [$ctx LinkGetCtxId] C-API
get an identifier which is unique per parent-or-child-context

Definition at line 1576 of file MqContextC_tcl.c.

1576 {
1581 goto end;
1582 error:
1584 end:
1586}
#define OT_retObj_SET_I32(nat)
#define LinkGetCtxId_doc

◆ tclmqmsgque_MqContextC_LinkGetParent()

static OT_ProcRet tclmqmsgque_MqContextC_LinkGetParent ( MqContextC_ARGS )
static

Tcl: MqContextC [$ctx LinkGetParent] C-API
get the initial parent-context from a client/server link …

Definition at line 1498 of file MqContextC_tcl.c.

1498 {
1502 MQ_CTX retVal = MqLinkGetParent (hdl);
1503 OT_retObj_SET_CTX(retVal);
1504 goto end;
1505 error:
1507 end:
1509}
#define OT_retObj_SET_CTX(nat)
#define LinkGetParent_doc

◆ tclmqmsgque_MqContextC_LinkGetTargetIdent()

static OT_ProcRet tclmqmsgque_MqContextC_LinkGetTargetIdent ( MqContextC_ARGS )
static

Tcl: string [$ctx LinkGetTargetIdent] C-API
get the ident of the link-target

Definition at line 1589 of file MqContextC_tcl.c.

1589 {
1594 goto end;
1595 error:
1597 end:
1599}
#define OT_retObj_SET_STR(nat)
#define LinkGetTargetIdent_doc

◆ tclmqmsgque_MqContextC_LinkIsConnected()

static OT_ProcRet tclmqmsgque_MqContextC_LinkIsConnected ( MqContextC_ARGS )
static

Tcl: bool [$ctx LinkIsConnected] C-API
is the context connected? …

Definition at line 1602 of file MqContextC_tcl.c.

1602 {
1607 goto end;
1608 error:
1610 end:
1612}
#define OT_retObj_SET_BOL(nat)
#define LinkIsConnected_doc

◆ tclmqmsgque_MqContextC_LinkIsParent()

static OT_ProcRet tclmqmsgque_MqContextC_LinkIsParent ( MqContextC_ARGS )
static

Tcl: bool [$ctx LinkIsParent] C-API
is the context a parent-context? …

Definition at line 1615 of file MqContextC_tcl.c.

1615 {
1620 goto end;
1621 error:
1623 end:
1625}
#define LinkIsParent_doc

◆ tclmqmsgque_MqContextC_LinkShutdown()

static OT_ProcRet tclmqmsgque_MqContextC_LinkShutdown ( MqContextC_ARGS )
static

Tcl: $ctx LinkShutdown C-API
shutdown the communication with a server

Definition at line 1628 of file MqContextC_tcl.c.

1628 {
1632 MkErrorC_Check(hdl,MqLinkShutdown (hdl));
1634 goto end;
1635 error:
1637 end:
1639}
#define LinkShutdown_doc