-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b103033
commit ae4e205
Showing
23 changed files
with
318 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/** info.h -- A2S_INFO server queries. */ | ||
|
||
#ifndef SSQ_A2S_INFO_H | ||
#define SSQ_A2S_INFO_H | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/* player.h -- A2S_PLAYER server queries. */ | ||
|
||
#ifndef SSQ_A2S_PLAYER_H | ||
#define SSQ_A2S_PLAYER_H | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/* rules.h -- A2S_RULES server queries. */ | ||
|
||
#ifndef SSQ_A2S_RULES_H | ||
#define SSQ_A2S_RULES_H | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/* query.h -- Server query routine. */ | ||
|
||
#ifndef SSQ_QUERY_H | ||
#define SSQ_QUERY_H | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/* response.h -- Query response utility. */ | ||
|
||
#ifndef SSQ_RESPONSE_H | ||
#define SSQ_RESPONSE_H | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* stream.h -- Data input stream. */ | ||
|
||
#ifndef SSQ_STREAM_H | ||
#define SSQ_STREAM_H | ||
|
||
#include <stdbool.h> | ||
#include <stddef.h> | ||
#include <stdint.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif /* __cplusplus */ | ||
|
||
typedef struct ssq_stream { | ||
const uint8_t *buf; | ||
size_t size; | ||
size_t pos; | ||
} SSQ_STREAM; | ||
|
||
void ssq_stream_wrap(SSQ_STREAM *stream, const void *buf, size_t size); | ||
|
||
void ssq_stream_advance(SSQ_STREAM *stream, size_t n); | ||
size_t ssq_stream_remaining(const SSQ_STREAM *stream); | ||
bool ssq_stream_end(const SSQ_STREAM *stream); | ||
|
||
void ssq_stream_read(SSQ_STREAM *src, void *dest, size_t n); | ||
int8_t ssq_stream_read_int8_t(SSQ_STREAM *stream); | ||
int16_t ssq_stream_read_int16_t(SSQ_STREAM *stream); | ||
int32_t ssq_stream_read_int32_t(SSQ_STREAM *stream); | ||
int64_t ssq_stream_read_int64_t(SSQ_STREAM *stream); | ||
uint8_t ssq_stream_read_uint8_t(SSQ_STREAM *stream); | ||
uint16_t ssq_stream_read_uint16_t(SSQ_STREAM *stream); | ||
uint32_t ssq_stream_read_uint32_t(SSQ_STREAM *stream); | ||
uint64_t ssq_stream_read_uint64_t(SSQ_STREAM *stream); | ||
float ssq_stream_read_float(SSQ_STREAM *stream); | ||
double ssq_stream_read_double(SSQ_STREAM *stream); | ||
bool ssq_stream_read_bool(SSQ_STREAM *stream); | ||
char *ssq_stream_read_string(SSQ_STREAM *stream, size_t *len); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif /* __cplusplus */ | ||
|
||
#endif /* !SSQ_STREAM_H */ |
Oops, something went wrong.