![]() |
botsense
3.2.0
RoadNarrows Client-Server Proxied Services Framework
|
The libBotSense internal declarations. More...
#include <errno.h>#include <pthread.h>#include "rnr/rnrconfig.h"#include "rnr/sock.h"#include "botsense/BotSense.h"#include "botsense/libBotSense.h"Go to the source code of this file.
Classes | |
| struct | BsTransInfo_T |
| Cashed Transaction Information Structure. More... | |
| struct | BsVConn_T |
| Client Virtual Connection Info Structure. More... | |
| struct | _bsClientStruct |
| The Client Structure Type. More... | |
Macros | |
| #define | BSCLIENT_T_READ 10000000 |
| 10 second read timeout default | |
| #define | BSCLIENT_T_WRITE 5000000 |
| 5 second write timeout default | |
| #define | BSCLIENT_T_FLUSH 5000000 |
| 5 second flush timeout default | |
| #define | _BS_LOG_MSGHDR(pClient, sPreface, pMsgHdr) |
| Log [pre/un]packed message header. More... | |
| #define | _BS_LOG_REQ(pClient, pMsgHdr) |
| Log successful request recieved event. More... | |
| #define | _BS_LOG_RSP(pClient, pMsgHdr) |
| Log successful repsonse recieved event. More... | |
Typedefs | |
| typedef struct _bsClientStruct | BsClient_T |
| The Client Structure Type. | |
Functions | |
| INLINE_IN_H BsVConn_T * | bsGetVConn (BsClient_T *pClient, BsVConnHnd_T hndVConn) |
| void | bsVConnClearAll (BsClient_T *pClient) |
| Remove and delete all of a client's vConnections. More... | |
| int | bsVConnAdd (BsClient_T *pClient, BsVConnHnd_T hndVConn, int index) |
| Add a created vConnection to the client's tblHndIndex table. More... | |
| int | bsVConnRemove (BsClient_T *pClient, BsVConnHnd_T hndVConn) |
| Remove a vConnection from the client's tblHndIndex table. More... | |
| int | bsVConnNew (BsClient_T *pClient, const char *sDevName, const char *sModName, const BsClientAppInfo_T *pAppInfo, bool_t bTrace) |
| Reserve a new client vConnection (and proxied device) in the client's tblVConn table. More... | |
| int | bsVConnDelete (BsClient_T *pClient, int index) |
| Delete a vConnection (and proxied device) from the client's tblVConn table. More... | |
The libBotSense internal declarations.
Definition in file bsLibInternal.h.
| #define _BS_LOG_MSGHDR | ( | pClient, | |
| sPreface, | |||
| pMsgHdr | |||
| ) |
Log [pre/un]packed message header.
| pClient |
Definition at line 127 of file bsLibInternal.h.
Referenced by bsClientRecvRsp(), and bsClientSendReq().
| #define _BS_LOG_REQ | ( | pClient, | |
| pMsgHdr | |||
| ) |
Log successful request recieved event.
| pClient |
Definition at line 145 of file bsLibInternal.h.
Referenced by bsClientTrans().
| #define _BS_LOG_RSP | ( | pClient, | |
| pMsgHdr | |||
| ) |
Log successful repsonse recieved event.
| pClient |
Definition at line 155 of file bsLibInternal.h.
Referenced by bsClientTrans().
| INLINE_IN_H BsVConn_T* bsGetVConn | ( | BsClient_T * | pClient, |
| BsVConnHnd_T | hndVConn | ||
| ) |
Get the client vConnection given the handle.
| pClient |
Definition at line 172 of file bsLibInternal.h.
References BSCLIENT_IS_VCONN_HANDLE, BSPROXY_VCONN_UNDEF, bsVConnAdd(), bsVConnClearAll(), bsVConnDelete(), bsVConnNew(), bsVConnRemove(), _bsClientStruct::m_tblHndIndex, and _bsClientStruct::m_tblVConn.
Referenced by bsClientAttrGetTraceState(), and bsClientGetMsgName().
| int bsVConnAdd | ( | BsClient_T * | pClient, |
| BsVConnHnd_T | hndVConn, | ||
| int | index | ||
| ) |
Add a created vConnection to the client's tblHndIndex table.
| pClient |
Definition at line 1506 of file bsLibClient.c.
References BS_ECODE_INTERNAL, BS_OK, BSCLIENT_IS_VCONN_HANDLE, BSCLIENT_LOG_ERROR, BSCLIENT_TRY_EXPR, BSPROXY_VCONN_CLIENT_MAX, BSPROXY_VCONN_UNDEF, bsTransLock(), bsTransUnlock(), BsVConn_T::m_hndVConn, _bsClientStruct::m_nVConnCount, _bsClientStruct::m_tblHndIndex, and _bsClientStruct::m_tblVConn.
Referenced by bsGetVConn(), and bsServerReqOpenDev().
| void bsVConnClearAll | ( | BsClient_T * | pClient | ) |
Remove and delete all of a client's vConnections.
| pClient |
Definition at line 1478 of file bsLibClient.c.
References BSPROXY_VCONN_UNDEF, bsVConnDelete(), bsVConnRemove(), and _bsClientStruct::m_tblHndIndex.
Referenced by bsClientDelete(), bsGetVConn(), and bsServerDisconnect().
| int bsVConnDelete | ( | BsClient_T * | pClient, |
| int | index | ||
| ) |
Delete a vConnection (and proxied device) from the client's tblVConn table.
| pClient |
Definition at line 1684 of file bsLibClient.c.
References BS_ECODE_INTERNAL, BS_OK, BSCLIENT_LOG_ERROR, BSCLIENT_TRY_EXPR, BSPROXY_VCONN_CLIENT_MAX, bsTransLock(), bsTransUnlock(), BsVConn_T::m_sDevName, BsVConn_T::m_sModName, and _bsClientStruct::m_tblVConn.
Referenced by bsGetVConn(), bsServerReqCloseDev(), bsServerReqOpenDev(), and bsVConnClearAll().
| int bsVConnNew | ( | BsClient_T * | pClient, |
| const char * | sDevName, | ||
| const char * | sModName, | ||
| const BsClientAppInfo_T * | pAppInfo, | ||
| bool_t | bTrace | ||
| ) |
Reserve a new client vConnection (and proxied device) in the client's tblVConn table.
| pClient |
Definition at line 1614 of file bsLibClient.c.
References BS_ECODE_INTERNAL, BS_ECODE_NO_RSRC, BS_OK, BSCLIENT_LOG_ERROR, bsClientAttrGetVConnCount(), BSPROXY_VCONN_CLIENT_MAX, BSPROXY_VCONN_UNDEF, bsTransLock(), bsTransUnlock(), BsVConn_T::m_bTrace, BsVConn_T::m_hndVConn, BsVConn_T::m_pAppInfo, BsVConn_T::m_sDevName, BsVConn_T::m_sModName, and _bsClientStruct::m_tblVConn.
Referenced by bsGetVConn(), and bsServerReqOpenDev().
| int bsVConnRemove | ( | BsClient_T * | pClient, |
| BsVConnHnd_T | hndVConn | ||
| ) |
Remove a vConnection from the client's tblHndIndex table.
| pClient |
Definition at line 1565 of file bsLibClient.c.
References BS_ECODE_INTERNAL, BSCLIENT_IS_VCONN_HANDLE, BSCLIENT_LOG_ERROR, BSCLIENT_TRY_EXPR, BSPROXY_VCONN_UNDEF, bsTransLock(), bsTransUnlock(), BsVConn_T::m_hndVConn, _bsClientStruct::m_nVConnCount, _bsClientStruct::m_tblHndIndex, and _bsClientStruct::m_tblVConn.
Referenced by bsGetVConn(), bsServerReqCloseDev(), and bsVConnClearAll().