diff options
| author | 2026-04-13 17:01:47 -0400 | |
|---|---|---|
| committer | 2026-04-13 17:01:47 -0400 | |
| commit | 77b54c35bf9587450cd636e0d7df37e190e28bfb (patch) | |
| tree | a290efdd8b09066847199f3f52a32be70d24ef51 /src/server/common.h | |
| parent | 20617b9c80cf8d8051ecdb53a2c22f68c012f21b (diff) | |
| download | camu-77b54c35bf9587450cd636e0d7df37e190e28bfb.tar.gz camu-77b54c35bf9587450cd636e0d7df37e190e28bfb.tar.bz2 camu-77b54c35bf9587450cd636e0d7df37e190e28bfb.zip | |
Smaller stuff that went uncommitted
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/server/common.h')
| -rw-r--r-- | src/server/common.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/server/common.h b/src/server/common.h index 814b557..82d5f3d 100644 --- a/src/server/common.h +++ b/src/server/common.h @@ -3,15 +3,19 @@ #include <al/str.h> #define CAMU_PORT 14356 -#define CAMU_MULTIPLEX_RPC 0x53 -#define CAMU_MULTIPLEX_LIANA 0x85 +#define CAMU_MULTIPLEX_RPC 0x53 +#define CAMU_MULTIPLEX_CONTROL 0x17 +#define CAMU_MULTIPLEX_LIANA 0x85 -AL_STATIC_ASSERT(rpc_not_head, CAMU_MULTIPLEX_RPC, !=, 0x48); // HEAD -AL_STATIC_ASSERT(rpc_not_get, CAMU_MULTIPLEX_RPC, !=, 0x47); // GET -AL_STATIC_ASSERT(rpc_not_post, CAMU_MULTIPLEX_RPC, !=, 0x50); // POST -AL_STATIC_ASSERT(liana_not_head, CAMU_MULTIPLEX_LIANA, !=, 0x48); -AL_STATIC_ASSERT(liana_not_get, CAMU_MULTIPLEX_LIANA, !=, 0x47); -AL_STATIC_ASSERT(liana_not_post, CAMU_MULTIPLEX_LIANA, !=, 0x50); +AL_STATIC_ASSERT(rpc_not_head, CAMU_MULTIPLEX_RPC, !=, 0x48); // HEAD +AL_STATIC_ASSERT(rpc_not_get, CAMU_MULTIPLEX_RPC, !=, 0x47); // GET +AL_STATIC_ASSERT(rpc_not_post, CAMU_MULTIPLEX_RPC, !=, 0x50); // POST +AL_STATIC_ASSERT(control_not_head, CAMU_MULTIPLEX_CONTROL, !=, 0x48); +AL_STATIC_ASSERT(control_not_get, CAMU_MULTIPLEX_CONTROL, !=, 0x47); +AL_STATIC_ASSERT(control_not_post, CAMU_MULTIPLEX_CONTROL, !=, 0x50); +AL_STATIC_ASSERT(liana_not_head, CAMU_MULTIPLEX_LIANA, !=, 0x48); +AL_STATIC_ASSERT(liana_not_get, CAMU_MULTIPLEX_LIANA, !=, 0x47); +AL_STATIC_ASSERT(liana_not_post, CAMU_MULTIPLEX_LIANA, !=, 0x50); //#define CAMU_DIRECT_MODE @@ -46,7 +50,7 @@ enum { CAMU_LIST_END }; -static inline bool camu_is_url(str *s, u32 i) +static inline bool camu_is_http_url(str *s, u32 i) { return (al_str_cmp(s, &al_str_c("https://"), i, 8) == 0) || (al_str_cmp(s, &al_str_c("http://"), i, 7) == 0); |