mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-21 06:35:00 -04:00
sse client to listen commands (from mapedit)
This commit is contained in:
parent
13f6c05c60
commit
bb5be10adc
10 changed files with 336 additions and 29 deletions
30
platform/sse_receiver.h
Normal file
30
platform/sse_receiver.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue