#include "os.h"
{
}
void
{
}
int
main ( int argc, char *argv[] )
{
const char *sessionProps[20];
int propIndex = 0;
const char *text_p = "Hello world!";
if ( argc < 5 ) {
printf ( "Usage: HelloWorldPub <msg_backbone_ip:port> <vpn> <client-username> <topic>\n" );
return -1;
}
printf ( "HelloWorldPub 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" );
destination.
dest = argv[4];
printf ( "About to send message '%s' to topic '%s'...\n", (char *)text_p, argv[4] );
printf ( "Message sent. Exiting.\n" );
return 0;
}