diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-07-15 08:38:33 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-07-15 08:38:33 +0200 |
| commit | f89a58860e4e3c76ef3c2e85d47ff38eeaaabb55 (patch) | |
| tree | ed5af12adc1654f8a480a1669d6d8b5bde8703e4 /src/publisher | |
| parent | c84520472c10a5085dc9004ed3b7c8019d01c4f9 (diff) | |
Minor changes
Diffstat (limited to 'src/publisher')
| -rw-r--r-- | src/publisher/Makefile | 15 | ||||
| -rw-r--r-- | src/publisher/main.c | 27 |
2 files changed, 0 insertions, 42 deletions
diff --git a/src/publisher/Makefile b/src/publisher/Makefile deleted file mode 100644 index 49bf5ea..0000000 --- a/src/publisher/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -include $(CONF) -EXEC=publisher -CFLAGS+=-lzmq - -DEFINES=\ --DPUBLISHER_PORT=$(PUBLISHER_PORT) \ --DPUBLISHER_ADDR=$(PUBLISHER_ADDR) - -all: main.c - $(CC) $^ -o $(OUT)/$(EXEC) $(CFLAGS) $(DEFINES) - -clean: - rm -f $(OUT)/$(EXEC) - -.PHONY: clean diff --git a/src/publisher/main.c b/src/publisher/main.c deleted file mode 100644 index 001df66..0000000 --- a/src/publisher/main.c +++ /dev/null @@ -1,27 +0,0 @@ -// Weather update server -// Binds PUB socket to tcp://*:5556 -// Publishes random weather updates - -#include <zmq.h> -#include <assert.h> -#include <time.h> - -#include "../utils.h" - -int main (void) -{ - // 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; -}
\ No newline at end of file |
