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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c79efbc5ca7777083632533f4495bfe97a7a7620
4
- data.tar.gz: 6a39986df45187e9b931996fb30f1e0729556217
2
+ SHA256:
3
+ metadata.gz: bc836a81702f965b8c73f1354f9e8107ef21c5cad23c99994a7ec387cbc320a1
4
+ data.tar.gz: e9d295da0d82b8358858a8574806a88119272679c821c9124be56d68358f7236
5
5
  SHA512:
6
- metadata.gz: 46ad7f7786e39411f2d6db934491d355a9a4736e2bdcc61125c5605d45a3ae5f94029324174be4422dcc4a87f16198c890787d7335a2c455dbbddc02907a9710
7
- data.tar.gz: 5b711ff0d284a0af45ad2ce60fb17652a11ae07fdaade33cf448679ae8dfae3b931da09e30fd9487d4df3624f08c03cf67480b267cdf396f477754826a25c187
6
+ metadata.gz: 744c0fd758cc16b9da4069a6b60eaaa83debc1c4334e0a79ded826b46328f94f6e73cdc321ae5abbef4f860ca269109986564305382ebca1092ad969b3be8219
7
+ data.tar.gz: 0d8168fd6544a2d49b4b19132bd9a46823f2b4d8878033fa4873122b36c54da8b6678f00190885e53c714a6452c1620ee944409b40321ad8586eceb7991bf9ff
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.0
4
+
5
+ - support for TLS
6
+
3
7
  ## 1.2.0
4
8
 
5
9
  - support for unix domain connection
@@ -27,7 +27,7 @@ EM.run do
27
27
  end
28
28
 
29
29
  ws.onping do |msg|
30
- puts "Receied ping: #{msg}"
30
+ puts "Received ping: #{msg}"
31
31
  end
32
32
 
33
33
  ws.onpong do |msg|
@@ -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
@@ -1,7 +1,7 @@
1
1
  module WebSocket
2
2
  module EventMachine
3
3
  class Client
4
- VERSION = '1.2.0'
4
+ VERSION = '1.3.0'
5
5
  end
6
6
  end
7
7
  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.2.0
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: 2016-09-28 00:00:00.000000000 Z
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
- rubyforge_project:
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