diff options
author | Indrajith K L | 2022-12-03 17:00:20 +0530 |
---|---|---|
committer | Indrajith K L | 2022-12-03 17:00:20 +0530 |
commit | f5c4671bfbad96bf346bd7e9a21fc4317b4959df (patch) | |
tree | 2764fc62da58f2ba8da7ed341643fc359873142f /v_windows/v/old/vlib/picohttpparser/picohttpparser.v | |
download | cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.gz cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.bz2 cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.zip |
Diffstat (limited to 'v_windows/v/old/vlib/picohttpparser/picohttpparser.v')
-rw-r--r-- | v_windows/v/old/vlib/picohttpparser/picohttpparser.v | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/v_windows/v/old/vlib/picohttpparser/picohttpparser.v b/v_windows/v/old/vlib/picohttpparser/picohttpparser.v new file mode 100644 index 0000000..a8c93e6 --- /dev/null +++ b/v_windows/v/old/vlib/picohttpparser/picohttpparser.v @@ -0,0 +1,35 @@ +// Copyright (c) 2019-2021 Alexander Medvednikov. All rights reserved. +// Use of this source code is governed by an MIT license +// that can be found in the LICENSE file. +module picohttpparser + +#flag -I @VEXEROOT/thirdparty/picohttpparser +#flag -L @VEXEROOT/thirdparty/picohttpparser +#flag @VEXEROOT/thirdparty/picohttpparser/picohttpparser.o + +#include "picohttpparser.h" + +struct C.phr_header { +pub: + name &char + name_len int + value &char + value_len int +} + +type PPchar = &&char + +struct C.phr_header_t {} + +fn C.phr_parse_request(buf &char, len size_t, method PPchar, method_len &size_t, path PPchar, path_len &size_t, minor_version &int, headers &C.phr_header, num_headers &size_t, last_len size_t) int + +fn C.phr_parse_response(buf &char, len size_t, minor_version &int, status &int, msg PPchar, msg_len &size_t, headers &C.phr_header, num_headers &size_t, last_len size_t) int + +fn C.phr_parse_headers(buf &char, len size_t, headers &C.phr_header, num_headers &size_t, last_len size_t) int + +fn C.phr_parse_request_path(buf_start &char, len size_t, method PPchar, method_len &size_t, path PPchar, path_len &size_t) int +fn C.phr_parse_request_path_pipeline(buf_start &char, len size_t, method PPchar, method_len &size_t, path PPchar, path_len &size_t) int +fn C.get_date() &byte + +// static inline int u64toa(char* buf, uint64_t value) { +fn C.u64toa(buffer &char, value u64) int |