CMSDK  2.0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cmlabs::RequestClient Class Reference
Inheritance diagram for cmlabs::RequestClient:
cmlabs::Runnable cmlabs::NetworkReceiver cmlabs::TestRequestClient

Public Member Functions

bool isConnected ()
 
bool reconnect ()
 
bool addGateway (uint32 id, std::string addr, uint16 port, uint8 encryption=NOENC)
 
RequestReplypostRequest (DataMessage *msg)
 
bool postRequest (DataMessage *msg, RequestCallbackFunction callback, uint32 timeoutMS)
 
bool finishRequest (RequestReply *reply)
 
bool receiveNetworkEvent (NetworkEvent *evt, NetworkChannel *channel, uint64 conid)
 
bool receiveMessage (DataMessage *msg, NetworkChannel *channel, uint64 conid)
 
bool receiveHTTPReply (HTTPReply *reply, HTTPRequest *req, NetworkChannel *channel, uint64 conid)
 
- Public Member Functions inherited from cmlabs::Runnable
virtual bool stop (uint32 timeout=200)
 
- Public Member Functions inherited from cmlabs::NetworkReceiver
virtual bool receiveHTTPRequest (HTTPRequest *req, NetworkChannel *channel, uint64 conid)
 
virtual bool receiveTelnetLine (TelnetLine *line, NetworkChannel *channel, uint64 conid)
 

Static Public Member Functions

static bool TestServerLogin (const char *address, uint16 port, const char *username, const char *password, const char *reqAfterLogin)
 
static std::string SendRequestAndWaitForJSON (RequestClient *client, DataMessage *msg, int timeoutMS)
 
static DataMessageSendRequestAndWaitForReply (RequestClient *client, DataMessage *msg, int timeoutMS)
 
static std::string GetJSONReplyParameter (const char *json, const char *name)
 
static DataMessageCreateRequestMessage (uint8 operation, const char *req, const char *key1=NULL, const char *val1=NULL, const char *key2=NULL, const char *val2=NULL, const char *key3=NULL, const char *val3=NULL, const char *key4=NULL, const char *val4=NULL, const char *key5=NULL, const char *val5=NULL, const char *key6=NULL, const char *val6=NULL, const char *key7=NULL, const char *val7=NULL, const char *key8=NULL, const char *val8=NULL, const char *key9=NULL, const char *val9=NULL, const char *key10=NULL, const char *val10=NULL, const char *key11=NULL, const char *val11=NULL, const char *key12=NULL, const char *val12=NULL, const char *key13=NULL, const char *val13=NULL, const char *key14=NULL, const char *val14=NULL, const char *key15=NULL, const char *val15=NULL, const char *key16=NULL, const char *val16=NULL, const char *key17=NULL, const char *val17=NULL, const char *key18=NULL, const char *val18=NULL, const char *key19=NULL, const char *val19=NULL, const char *key20=NULL, const char *val20=NULL)
 

Protected Member Functions

bool sendRequest (RequestReply *reply)
 
bool run ()
 
bool sendMessageToGateway (DataMessage *msg, RequestGatewayConnection &con)
 

Protected Attributes

NetworkManagermanager
 
NetworkChannelchannel
 
std::list< RequestGatewayConnectionconnections
 
utils::Mutex mutex
 
utils::Mutex conMutex
 
utils::WaitQueuePointer< RequestReply * > outQ
 
std::map< uint64, RequestReply * > requestMap
 
uint32 threadID
 
uint64 lastRefID
 
uint64 sentCount
 
uint64 receivedCount
 
MovingAverage avgStats
 
- Protected Attributes inherited from cmlabs::Runnable
uint32 threadID
 
bool shouldContinue
 
bool isRunning
 

Friends

THREAD_RET THREAD_FUNCTION_CALL RequestClientRun (THREAD_ARG arg)
 

The documentation for this class was generated from the following files: