Module: H2
- Defined in:
- lib/h2.rb,
lib/h2/client.rb,
lib/h2/server.rb,
lib/h2/stream.rb,
lib/h2/version.rb,
lib/h2/server/https.rb,
lib/h2/server/stream.rb,
lib/h2/client/celluloid.rb,
lib/h2/client/concurrent.rb,
lib/h2/client/tcp_socket.rb,
lib/h2/server/connection.rb,
lib/h2/server/push_promise.rb,
lib/h2/server/stream/request.rb,
lib/h2/server/stream/response.rb,
lib/h2/server/stream/event_source.rb
Defined Under Namespace
Modules: Blockable, FrameDebugger, HeaderStringifier, On
Classes: Client, Server, Stream
Constant Summary
collapse
- AUTHORITY_KEY =
':authority'
- METHOD_KEY =
':method'
- PATH_KEY =
':path'
- SCHEME_KEY =
':scheme'
- STATUS_KEY =
':status'
- USER_AGENT =
{
'user-agent' => "h2/#{H2::VERSION} #{RUBY_ENGINE}-#{RUBY_VERSION}/#{RUBY_PLATFORM}"
}
- REQUEST_METHODS =
[
:get,
:delete,
:head,
:options,
:patch,
:post,
:put
]
- Logger =
::Logger.new STDOUT
- CONTENT_LENGTH_KEY =
'content-length'
- VERSION =
'0.7.0'
- ALPN_OPENSSL_MIN_VERSION =
0x10002001
Class Method Summary
collapse
Class Method Details
.alpn? ⇒ Boolean
11
12
13
|
# File 'lib/h2/server.rb', line 11
def alpn?
!jruby? && OpenSSL::OPENSSL_VERSION_NUMBER >= ALPN_OPENSSL_MIN_VERSION && RUBY_VERSION >= '2.3'
end
|
.exceptionless_io? ⇒ Boolean
12
13
14
|
# File 'lib/h2/version.rb', line 12
def exceptionless_io?
RUBY_VERSION >= '2.3' && !jruby?
end
|
.jruby? ⇒ Boolean
15
16
17
18
|
# File 'lib/h2/server.rb', line 15
def jruby?
return @jruby if defined? @jruby
@jruby = RUBY_ENGINE == 'jruby'
end
|
.verbose! ⇒ Object
turn on extra verbose debug logging
38
39
40
|
# File 'lib/h2.rb', line 38
def verbose!
@verbose = true
end
|
.verbose? ⇒ Boolean
42
43
44
45
|
# File 'lib/h2.rb', line 42
def verbose?
@verbose = false unless defined?(@verbose)
@verbose
end
|