mirror of
https://gitlab.com/manzerbredes/ina260-zmq-publisher.git
synced 2025-05-07 12:22:51 +00:00
Minor changes
This commit is contained in:
parent
e0440fc811
commit
5f4d586aca
7 changed files with 35 additions and 21 deletions
|
@ -6,12 +6,8 @@
|
|||
#include <time.h>
|
||||
#include <string.h>
|
||||
|
||||
#define STR(symbol) #symbol
|
||||
#define STRINGIFY(symbol) STR(symbol)
|
||||
#include "../utils.h"
|
||||
|
||||
#ifndef PUBLISHER_PORT
|
||||
#error PUBLISHER_PORT macro undefined
|
||||
#endif
|
||||
|
||||
int main (int argc, char *argv [])
|
||||
{
|
||||
|
@ -19,7 +15,7 @@ int main (int argc, char *argv [])
|
|||
printf ("Collecting updates from weather server...\n");
|
||||
void *context = zmq_ctx_new ();
|
||||
void *subscriber = zmq_socket (context, ZMQ_SUB);
|
||||
int rc = zmq_connect (subscriber, "tcp://localhost:"STRINGIFY(PUBLISHER_PORT));
|
||||
int rc = zmq_connect (subscriber, "tcp://"STRINGIFY(PUBLISHER_ADDR)":"STRINGIFY(PUBLISHER_PORT));
|
||||
assert (rc == 0);
|
||||
|
||||
// Subscribe to zipcode, default is NYC, 10001
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue