@@ -5,16 +5,19 @@ interface stream
55 const localname: (self) -> (integer, string, integer?)|(nil)|(nil, string, number)
66 const peername: (self) -> (integer, string, integer?)|(nil)|(nil, string, number)
77 const write_continue: (self, number?) -> (true)|(nil, string, number)
8- const each_chunk: (self) -> ()
8+ const each_chunk: (self) -> ((stream)->(string)|(nil)|(nil, string, number), self )
99 const get_body_as_string: (self, number?) -> (string)|(nil, string, number)
1010 const get_body_chars: (self, integer, number?) -> (string)|(nil, string, number)
1111 const get_body_until: (self, string, boolean, boolean, number?) -> (string)|(nil, string, number)
1212 const save_body_to_file: (self, file, number?) -> (true)|(nil, string, number)
1313 const get_body_as_file: (self, number?) -> (file)|(nil, string, number)
1414 const write_body_from_string: (self, string, number?) -> (true)|(nil, string, number)
1515 const write_body_from_file: (self, {"file":file, "count": integer?}|file, number?) -> (true)|(nil, string, number)
16+
1617 -- Not in stream_common.lua
1718 const connection: connection
19+ const get_headers: (self, number?) -> (headers)|(nil)|(nil, string, number)
20+ const get_next_chunk: (self, number?) -> (string)|(nil)|(nil, string, number)
1821 const write_headers: (self, headers, boolean, number?) -> (true)|(nil, string, number)
1922 const write_chunk: (self, string, boolean, number?) -> (true)|(nil, string, number)
2023 const unget: (self, string) -> (true)
0 commit comments