summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/publisher.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/publisher.c b/src/publisher.c
index 45a248e..c9f702e 100644
--- a/src/publisher.c
+++ b/src/publisher.c
@@ -74,25 +74,12 @@ int main (int argc, char *argv [])
zmq_ctx_destroy (context);
return 0;
- // // Prepare our context and publisher
- // void *context = zmq_ctx_new ();
- // void *publisher = zmq_socket (context, ZMQ_PUB);
- // int rc = zmq_bind (publisher, "tcp://*:"STRINGIFY(PUBLISHER_PORT));
- // assert (rc == 0);
-
- // // Initialize random number generator
- // while (1) {
- // zmq_send (publisher, "Hello World", 5, 0);
- // printf("AA\n");
- // }
- // zmq_close (publisher);
- // zmq_ctx_destroy (context);
- return 0;
}
void publish(void *publisher, char *filepath, char* client, long int interval){
printf("Publish!\n");
char buffer[ZMQ_MSG_SIZE];
sprintf(buffer,"%s\n%s\n%ld",ZMQ_TOKEN,__key,interval);
+ // TODO: Send every lines of the file
zmq_send (publisher, buffer, ZMQ_MSG_SIZE, 0);
} \ No newline at end of file