ssdp 1.1.7 → 1.2.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
2
  SHA256:
3
- metadata.gz: 9dde6e34c6341d13f464d3786568706e2ac0c5d8ab2789cd814dfb8b717746cb
4
- data.tar.gz: 432923b54a22f5e5f444877606de2d8665767eeb7ae69809b59f414c6c89380d
3
+ metadata.gz: b2e2dc8c0115e7fd095824e0a57188bc9c5950c85bb3f0f320d2684fbc8f80e1
4
+ data.tar.gz: c2d580c2f3a7ec13b5e5dc34807f3195e674b887c5126f2c264a17838fd17765
5
5
  SHA512:
6
- metadata.gz: d197d4f990bbf0838ffac6d06c5e29b4673798b92ef24d30caf56e72f7e548f9a6be2c075d0c6eb01f911ad0f8c41f91cc71c17f652f296cd8589611ad0c8a8f
7
- data.tar.gz: 8612b41a6f26aad72946a48e916f841f7565c18d78be761e7aa2c007bfe7966f6be5b3a6d2bb0c5a2c1b3088a114a542540a66739d07ff2776594d7a8582dbdc
6
+ metadata.gz: 2346f24f510042a62d02f9e42ea9e4ebbb732deee17066e5963eb0a3490d5868e28a1eb9ada0ce95a3e14cb7f46f75d17d2fd438d03ae0477664825e06f6a221
7
+ data.tar.gz: 30ee2476c03ee7657588dc67629579955f70f0c458c6adccc873ec5863ae43d3403df21e0252d8d88c7b352054b34f4d5ec187740e8a0710e77f7b82ada3b681
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright © 2015, Dillon Aumiller
1
+ Copyright © 2022, Darcy Aumiller
2
2
  All rights reserved.
3
3
 
4
4
  BSD 2-Clause License
data/lib/ssdp/consumer.rb CHANGED
@@ -5,7 +5,7 @@ module SSDP
5
5
  class Consumer
6
6
  def initialize(options={})
7
7
  @options = SSDP::DEFAULTS.merge options
8
- @search_socket = SSDP.create_broadcaster
8
+ @search_socket = SSDP.create_broadcaster @options
9
9
  @watch = {
10
10
  :socket => nil,
11
11
  :thread => nil,
data/lib/ssdp/producer.rb CHANGED
@@ -114,7 +114,7 @@ module SSDP
114
114
  end
115
115
 
116
116
  def send_broadcast_packet(body)
117
- broadcaster = SSDP.create_broadcaster
117
+ broadcaster = SSDP.create_broadcaster @options
118
118
  broadcaster.send body, 0, @options[:broadcast], @options[:port]
119
119
  broadcaster.close
120
120
  end
data/lib/ssdp.rb CHANGED
@@ -56,10 +56,11 @@ module SSDP
56
56
  end
57
57
  module_function :create_listener
58
58
 
59
- def create_broadcaster
59
+ def create_broadcaster(options)
60
60
  broadcaster = UDPSocket.new
61
61
  broadcaster.setsockopt Socket::SOL_SOCKET, Socket::SO_BROADCAST, true
62
62
  broadcaster.setsockopt Socket::IPPROTO_IP, Socket::IP_MULTICAST_TTL, 1
63
+ broadcaster.setsockopt Socket::IPPROTO_IP, Socket::IP_MULTICAST_IF, IPAddr.new(options[:bind]).hton
63
64
  broadcaster
64
65
  end
65
66
  module_function :create_broadcaster
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssdp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
- - Dillon Aumiller
8
- autorequire:
7
+ - Darcy Aumiller
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-24 00:00:00.000000000 Z
11
+ date: 2022-08-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: SSDP client/server library. Server notify/part/respond; client search/listen.
14
- email: dillonaumiller@gmail.com
14
+ email: darcy.aumiller@gmail.com
15
15
  executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
@@ -24,7 +24,7 @@ homepage: https://github.com/daumiller/ssdp
24
24
  licenses:
25
25
  - BSD-2-Clause
26
26
  metadata: {}
27
- post_install_message:
27
+ post_install_message:
28
28
  rdoc_options: []
29
29
  require_paths:
30
30
  - lib
@@ -39,9 +39,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  requirements: []
42
- rubyforge_project:
43
- rubygems_version: 2.7.4
44
- signing_key:
42
+ rubygems_version: 3.3.7
43
+ signing_key:
45
44
  specification_version: 4
46
45
  summary: SSDP client/server library.
47
46
  test_files: []