websocket-eventmachine-client 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -0
- data/examples/echo_client.rb +1 -1
- data/lib/websocket/eventmachine/client.rb +4 -1
- data/lib/websocket/eventmachine/client/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bc836a81702f965b8c73f1354f9e8107ef21c5cad23c99994a7ec387cbc320a1
|
4
|
+
data.tar.gz: e9d295da0d82b8358858a8574806a88119272679c821c9124be56d68358f7236
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 744c0fd758cc16b9da4069a6b60eaaa83debc1c4334e0a79ded826b46328f94f6e73cdc321ae5abbef4f860ca269109986564305382ebca1092ad969b3be8219
|
7
|
+
data.tar.gz: 0d8168fd6544a2d49b4b19132bd9a46823f2b4d8878033fa4873122b36c54da8b6678f00190885e53c714a6452c1620ee944409b40321ad8586eceb7991bf9ff
|
data/CHANGELOG.md
CHANGED
data/examples/echo_client.rb
CHANGED
@@ -23,6 +23,7 @@ module WebSocket
|
|
23
23
|
# @option args [Integer] :version Version of protocol to use(default = 13)
|
24
24
|
# @option args [Hash] :headers HTTP headers to use in the handshake
|
25
25
|
# @option args [Boolean] :ssl Force SSL/TLS connection
|
26
|
+
# @option args [Hash] :tls TLS options hash to be passed to EM start_tls
|
26
27
|
def self.connect(args = {})
|
27
28
|
host = nil
|
28
29
|
port = nil
|
@@ -35,6 +36,8 @@ module WebSocket
|
|
35
36
|
host = args[:host] if args[:host]
|
36
37
|
port = args[:port] if args[:port]
|
37
38
|
if args[:ssl]
|
39
|
+
args[:tls] ||= {}
|
40
|
+
args[:tls][:sni_hostname] ||= host
|
38
41
|
port ||= 443
|
39
42
|
else
|
40
43
|
port ||= 80
|
@@ -83,7 +86,7 @@ module WebSocket
|
|
83
86
|
# @private
|
84
87
|
def connection_completed
|
85
88
|
if @args[:ssl]
|
86
|
-
start_tls
|
89
|
+
start_tls @args[:tls]
|
87
90
|
else
|
88
91
|
send(@handshake.to_s, :type => :plain)
|
89
92
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: websocket-eventmachine-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernard Potocki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket-eventmachine-base
|
@@ -61,8 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
|
65
|
-
rubygems_version: 2.5.1
|
64
|
+
rubygems_version: 3.0.3
|
66
65
|
signing_key:
|
67
66
|
specification_version: 4
|
68
67
|
summary: WebSocket client for Ruby
|