From be5df1c4e639ca6a7cd70a3122039a1de4588e28 Mon Sep 17 00:00:00 2001 From: cbdev Date: Fri, 2 Mar 2018 03:08:32 +0100 Subject: Implement keepalive frames --- artnet.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'artnet.h') diff --git a/artnet.h b/artnet.h index a2fd388..90aedd5 100644 --- a/artnet.h +++ b/artnet.h @@ -14,7 +14,7 @@ static int artnet_shutdown(); #define ARTNET_PORT "6454" #define ARTNET_VERSION 14 #define ARTNET_RECV_BUF 4096 -#define ARTNET_KEEPALIVE_INTERVAL 15e5 +#define ARTNET_KEEPALIVE_INTERVAL 2000 #define MAP_COARSE 0x0200 #define MAP_FINE 0x0400 @@ -50,6 +50,13 @@ typedef union /*_artnet_instance_id*/ { uint64_t label; } artnet_instance_id; +typedef struct /*_artnet_fd*/ { + int fd; + size_t output_instances; + artnet_instance_id* output_instance; + uint64_t* last_frame; +} artnet_descriptor; + #pragma pack(push, 1) typedef struct /*_artnet_hdr*/ { uint8_t magic[8]; -- cgit v1.2.3