#include "os.h"
static int msgCount = 0;
{
printf ( "Received message:\n" );
printf ( "\n" );
msgCount++;
}
void
{
}
int
main ( int argc, char *argv[] )
{
const char *sessionProps[20];
int propIndex = 0;
if ( argc < 5 ) {
printf ( "Usage: HelloWorldSub <msg_backbone_ip:port> <vpn> <client-username> <topic>\n" );
return -1;
}
printf ( "HelloWorldSub initializing...\n" );
&context_p, &contextFuncInfo, sizeof ( contextFuncInfo ) );
propIndex = 0;
sessionProps[propIndex++] = argv[1];
sessionProps[propIndex++] = argv[2];
sessionProps[propIndex++] = argv[3];
sessionProps[propIndex] = NULL;
context_p,
&session_p, &sessionFuncInfo, sizeof ( sessionFuncInfo ) );
printf ( "Connected.\n" );
argv[4] );
printf ( "Waiting for message......\n" );
fflush ( stdout );
while ( msgCount < 1 ) {
SLEEP ( 1 );
}
printf ( "Exiting.\n" );
argv[4] );
return 0;
}