mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-20 13:15:16 -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
32
platform/mtqueue.h
Normal file
32
platform/mtqueue.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct tag_mtqueue MTQUEUE;
|
||||
///Create multithread queue
|
||||
MTQUEUE *mtqueue_create();
|
||||
///push to queue (string is copied)
|
||||
/**
|
||||
* @param q queue
|
||||
* @param message message (string is copied)
|
||||
*/
|
||||
void mtqueue_push(MTQUEUE *q, const char *message);
|
||||
///pop from the queue
|
||||
/**
|
||||
*
|
||||
* @param q queue
|
||||
* @return NULL, if queue is empty, or string. You have to release
|
||||
* string by calling free() when you finish.
|
||||
*/
|
||||
char *mtqueue_pop(MTQUEUE *q);
|
||||
|
||||
///destroy the queue
|
||||
void mtqueue_destroy(MTQUEUE *q);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue