#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <XmlBlasterAccessUnparsed.h>
Include dependency graph for Subscriber.c:
Go to the source code of this file.
Functions | |
static int | myUpdate (MsgUnitArr *msgUnitArr, void *userData, XmlBlasterException *exception) |
Here we receive the callback messages from xmlBlaster. | |
static void | callbackProgressListener (void *userP, size_t currBytesRead, size_t nbytes) |
Access the read socket progress. | |
int | main (int argc, char **argv) |
Invoke examples:. | |
Variables | |
static char * | updateExceptionErrorCode = 0 |
static char * | updateExceptionMessage = 0 |
static char * | subscribeToken = 0 |
static char * | queryType |
static int | message_counter = 1 |
static long | updateSleep = 0l |
static int | reportUpdateProgress = 0 |
static int64_t | startTimestamp = 0ll |
static int | verbose = 1 |
static void callbackProgressListener | ( | void * | userP, | |
size_t | currBytesRead, | |||
size_t | nbytes | |||
) | [static] |
Access the read socket progress.
You need to register this function pointer if you want to see the progress of huge messages on slow connections.
Definition at line 97 of file Subscriber.c.
References XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, and XMLBLASTER_LOG_WARN.
int main | ( | int | argc, | |
char ** | argv | |||
) |
Invoke examples:.
Subscriber -logLevel TRACE
Subscriber -session.name Subscriber/1 -dispatch/callback/retries -1 -subscribe/qos/persistent true -interactiveSubscribe true
Definition at line 115 of file Subscriber.c.
References XmlBlasterAccessUnparsed::callbackP, callbackProgressListener(), XmlBlasterAccessUnparsed::connect, XmlBlasterAccessUnparsed::disconnect, ExceptionStruct::errorCode, freeQosArr(), freeXmlBlasterAccessUnparsed(), PropertiesStruct::getBool, PropertiesStruct::getInt, PropertiesStruct::getLong, PropertiesStruct::getString, getXmlBlasterAccessUnparsed(), getXmlBlasterVersion(), CallbackServerUnparsedStruct::hostCB, XmlBlasterAccessUnparsed::initialize, QosStructArr::len, ExceptionStruct::message, myUpdate(), XmlBlasterReadFromSocketFuncHolder::numReadFuncP, XmlBlasterReadFromSocketFuncHolder::numReadUserP, CallbackServerUnparsedStruct::portCB, XmlBlasterAccessUnparsed::props, QosStructArr::qosArr, queryType, CallbackServerUnparsedStruct::readFromSocket, reportUpdateProgress, XmlBlasterAccessUnparsed::subscribe, subscribeToken, XmlBlasterAccessUnparsed::unSubscribe, updateExceptionErrorCode, updateExceptionMessage, updateSleep, verbose, XMLBLASTER_MAX_USAGE_LEN, xmlBlasterAccessUnparsedUsage(), and xmlBlasterFree().
Here is the call graph for this function:
static int myUpdate | ( | MsgUnitArr * | msgUnitArr, | |
void * | userData, | |||
XmlBlasterException * | exception | |||
) | [static] |
Here we receive the callback messages from xmlBlaster.
Definition at line 31 of file Subscriber.c.
References ExceptionStruct::errorCode, getTimestamp(), MsgUnitStructArr::len, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logUserP, ExceptionStruct::message, message_counter, messageUnitToXmlLimited(), MsgUnitStructArr::msgUnitArr, MsgUnit::responseQos, sleepMillis(), startTimestamp, strcpyAlloc(), strncpy0(), updateExceptionErrorCode, updateExceptionMessage, updateSleep, verbose, XMLBLASTER_LOG_INFO, XMLBLASTEREXCEPTION_ERRORCODE_LEN, XMLBLASTEREXCEPTION_MESSAGE_LEN, and xmlBlasterFree().
Here is the call graph for this function:
int message_counter = 1 [static] |
char* queryType [static] |
int reportUpdateProgress = 0 [static] |
int64_t startTimestamp = 0ll [static] |
char* subscribeToken = 0 [static] |
char* updateExceptionErrorCode = 0 [static] |
char* updateExceptionMessage = 0 [static] |
long updateSleep = 0l [static] |
int verbose = 1 [static] |