sse client to listen commands (from mapedit)

This commit is contained in:
Ondřej Novák 2025-05-07 17:46:51 +02:00
parent 13f6c05c60
commit bb5be10adc
10 changed files with 336 additions and 29 deletions

30
platform/sse_receiver.h Normal file
View file

@ -0,0 +1,30 @@
#pragma once
#include "mtqueue.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct tag_sse_receiver SSE_RECEIVER;
///Install sse receiver
/**
* @param q mtqueue, which receives messages received by the receiver
* @param host host
* @param port port
* @return pointer to instance of receiver
*/
SSE_RECEIVER *sse_receiver_install(MTQUEUE *q, const char *host, const char *port);
///Stops the receiver
/**
* @param inst instance of receiver
* @note the associated queue is not destroyed
*/
void sse_receiver_stop(SSE_RECEIVER *inst);
#ifdef __cplusplus
}
#endif