llhttp 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Binary file
Binary file
Binary file
@@ -8,58 +8,90 @@ module LLHttp
8
8
  # ...
9
9
  # end
10
10
  #
11
- # ...
11
+ # def on_url(url)
12
+ # ...
13
+ # end
14
+ #
15
+ # def on_status(status)
16
+ # ...
17
+ # end
18
+ #
19
+ # def on_header_field(field)
20
+ # ...
21
+ # end
22
+ #
23
+ # def on_header_value(value)
24
+ # ...
25
+ # end
26
+ #
27
+ # def on_headers_complete
28
+ # ...
29
+ # end
30
+ #
31
+ # def on_body(body)
32
+ # ...
33
+ # end
34
+ #
35
+ # def on_message_complete
36
+ # ...
37
+ # end
38
+ #
39
+ # def on_chunk_header
40
+ # ...
41
+ # end
42
+ #
43
+ # def on_chunk_complete
44
+ # ...
45
+ # end
46
+ #
47
+ # def on_url_complete
48
+ # ...
49
+ # end
50
+ #
51
+ # def on_status_complete
52
+ # ...
53
+ # end
54
+ #
55
+ # def on_header_field_complete
56
+ # ...
57
+ # end
58
+ #
59
+ # def on_header_value_complete
60
+ # ...
61
+ # end
12
62
  # end
13
63
  #
14
64
  class Delegate
15
- # [public]
16
- #
17
- def on_message_begin
18
- end
65
+ private def internal_on_message_begin
66
+ on_message_begin
19
67
 
20
- # [public]
21
- #
22
- def on_url(url)
68
+ 0
69
+ rescue
70
+ -1
23
71
  end
24
72
 
25
- # [public]
26
- #
27
- def on_status(status)
28
- end
73
+ private def internal_on_headers_complete
74
+ on_headers_complete
29
75
 
30
- # [public]
31
- #
32
- def on_header_field(field)
76
+ 0
77
+ rescue
78
+ -1
33
79
  end
34
80
 
35
- # [public]
36
- #
37
- def on_header_value(value)
38
- end
81
+ private def internal_on_message_complete
82
+ on_message_complete
39
83
 
40
- # [public]
41
- #
42
- def on_headers_complete
84
+ 0
85
+ rescue
86
+ -1
43
87
  end
44
88
 
45
- # [public]
46
- #
47
- def on_body(body)
48
- end
49
-
50
- # [public]
51
- #
52
- def on_message_complete
53
- end
54
-
55
- # [public]
56
- #
57
- def on_chunk_header
58
- end
89
+ private def internal_on_chunk_header
90
+ on_chunk_header
59
91
 
60
- # [public]
61
- #
62
- def on_chunk_complete
92
+ 0
93
+ rescue
94
+ -1
63
95
  end
64
96
  end
65
97
  end
data/lib/llhttp/parser.rb CHANGED
@@ -20,8 +20,10 @@ module LLHttp
20
20
  # Introspection
21
21
  #
22
22
  # * `LLHttp::Parser#content_length` returns the content length of the current request.
23
- # * `LLHttp::Parser#method` returns the method of the current response.
23
+ # * `LLHttp::Parser#method_name` returns the method name of the current response.
24
24
  # * `LLHttp::Parser#status_code` returns the status code of the current response.
25
+ # * `LLHttp::Parser#http_major` returns the major http version of the current request/response.
26
+ # * `LLHttp::Parser#http_minor` returns the minor http version of the current request/response.
25
27
  # * `LLHttp::Parser#keep_alive?` returns `true` if there might be more messages.
26
28
  #
27
29
  # Finishing
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LLHttp
4
- VERSION = "0.0.3"
4
+ VERSION = "0.1.0"
5
5
 
6
6
  # [public] LLHttp's current version.
7
7
  #
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llhttp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Powell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-31 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby bindings for llhttp.
14
14
  email: bryan@metabahn.com
@@ -26,14 +26,20 @@ files:
26
26
  - ext/llhttp/llhttp.c
27
27
  - ext/llhttp/llhttp.h
28
28
  - ext/llhttp/llhttp_ext.c
29
+ - ext/x86_64-darwin/libllhttp-ext.bundle
30
+ - ext/x86_64-darwin/llhttp/api.o
31
+ - ext/x86_64-darwin/llhttp/http.o
32
+ - ext/x86_64-darwin/llhttp/llhttp.o
33
+ - ext/x86_64-darwin/llhttp/llhttp_ext.o
29
34
  - lib/llhttp.rb
30
35
  - lib/llhttp/delegate.rb
31
36
  - lib/llhttp/error.rb
32
37
  - lib/llhttp/parser.rb
33
38
  - lib/llhttp/version.rb
39
+ - lib/llhttp_ext.bundle
34
40
  homepage: https://github.com/metabahn/llhttp/
35
41
  licenses:
36
- - MIT
42
+ - MPL-2.0
37
43
  metadata: {}
38
44
  post_install_message:
39
45
  rdoc_options: []
@@ -50,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
56
  - !ruby/object:Gem::Version
51
57
  version: '0'
52
58
  requirements: []
53
- rubygems_version: 3.2.3
59
+ rubygems_version: 3.2.4
54
60
  signing_key:
55
61
  specification_version: 4
56
62
  summary: Ruby bindings for llhttp.