rgossip2 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/gossip +2 -0
- data/lib/rgossip2/{gossipper.rb → gossiper.rb} +0 -0
- data/lib/rgossip2/node_list.rb +7 -0
- data/lib/rgossip2.rb +1 -1
- metadata +52 -67
data/bin/gossip
CHANGED
File without changes
|
data/lib/rgossip2/node_list.rb
CHANGED
@@ -15,6 +15,8 @@ module RGossip2
|
|
15
15
|
# | Receiver |<>---+
|
16
16
|
# +------------+
|
17
17
|
#
|
18
|
+
|
19
|
+
class NodeListException < Exception; end
|
18
20
|
class NodeList
|
19
21
|
include ContextHelper
|
20
22
|
extend Forwardable
|
@@ -67,6 +69,11 @@ module RGossip2
|
|
67
69
|
# 長さを知るためにシリアライズ
|
68
70
|
packed = node.serialize
|
69
71
|
|
72
|
+
# Prevent infinite loop when packed exceeds bufsiz. Loop happens because packed is never less than bufsize, therefor always triggering a redo.
|
73
|
+
if packed.length > bufsiz
|
74
|
+
raise NodeListException.new("serialized packed length (#{packed.length}) exceeds bufsiz (#{bufsiz})")
|
75
|
+
end
|
76
|
+
|
70
77
|
# シリアライズしてバッファサイズ以下ならチャンクに追加
|
71
78
|
if (datasum + packed).length <= bufsiz
|
72
79
|
nodes << node
|
data/lib/rgossip2.rb
CHANGED
metadata
CHANGED
@@ -1,104 +1,89 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rgossip2
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 4
|
10
|
-
version: 0.2.4
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- winebarrel
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-05-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: msgpack
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: rping
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rping
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
38
33
|
none: false
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
hash: 19
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
- 1
|
46
|
-
- 4
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
47
37
|
version: 0.1.4
|
48
38
|
type: :runtime
|
49
|
-
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.1.4
|
50
46
|
description:
|
51
47
|
email: sgwr_dts@yahoo.co.jp
|
52
|
-
executables:
|
48
|
+
executables:
|
53
49
|
- gossip
|
54
50
|
extensions: []
|
55
|
-
|
56
51
|
extra_rdoc_files: []
|
57
|
-
|
58
|
-
files:
|
52
|
+
files:
|
59
53
|
- README
|
60
54
|
- bin/gossip
|
61
|
-
- lib/rgossip2.rb
|
62
|
-
- lib/rgossip2/timer.rb
|
63
|
-
- lib/rgossip2/gossipper.rb
|
64
55
|
- lib/rgossip2/client.rb
|
65
|
-
- lib/rgossip2/receiver.rb
|
66
56
|
- lib/rgossip2/context.rb
|
67
|
-
- lib/rgossip2/node.rb
|
68
57
|
- lib/rgossip2/context_helper.rb
|
58
|
+
- lib/rgossip2/gossiper.rb
|
59
|
+
- lib/rgossip2/node.rb
|
69
60
|
- lib/rgossip2/node_list.rb
|
61
|
+
- lib/rgossip2/receiver.rb
|
62
|
+
- lib/rgossip2/timer.rb
|
63
|
+
- lib/rgossip2.rb
|
70
64
|
homepage: https://bitbucket.org/winebarrel/rgossip2
|
71
65
|
licenses: []
|
72
|
-
|
73
66
|
post_install_message:
|
74
67
|
rdoc_options: []
|
75
|
-
|
76
|
-
require_paths:
|
68
|
+
require_paths:
|
77
69
|
- lib
|
78
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
71
|
none: false
|
80
|
-
requirements:
|
81
|
-
- -
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
|
84
|
-
|
85
|
-
- 0
|
86
|
-
version: "0"
|
87
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
77
|
none: false
|
89
|
-
requirements:
|
90
|
-
- -
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
|
93
|
-
segments:
|
94
|
-
- 0
|
95
|
-
version: "0"
|
78
|
+
requirements:
|
79
|
+
- - ! '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
96
82
|
requirements: []
|
97
|
-
|
98
83
|
rubyforge_project:
|
99
|
-
rubygems_version: 1.8.
|
84
|
+
rubygems_version: 1.8.23
|
100
85
|
signing_key:
|
101
86
|
specification_version: 3
|
102
|
-
summary: Basic implementation of a gossip protocol. This is a porting of Java implementation.
|
87
|
+
summary: Basic implementation of a gossip protocol. This is a porting of Java implementation.
|
88
|
+
see http://code.google.com/p/gossip-protocol-java/
|
103
89
|
test_files: []
|
104
|
-
|