mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-20 13:15:16 -04:00
improve sse receiver
This commit is contained in:
parent
bb5be10adc
commit
240c8764fb
7 changed files with 213 additions and 266 deletions
|
@ -1,28 +1,14 @@
|
|||
#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);
|
||||
SSE_RECEIVER *sse_receiver_create(const char *host, const char *port);
|
||||
const char *sse_receiver_receive(SSE_RECEIVER *sse);
|
||||
void sse_receiver_destroy(SSE_RECEIVER *inst);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue