msgpack-rpc 0.4.5 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3 -2
- data/lib/msgpack/rpc.rb +1 -1
- data/lib/msgpack/rpc/loop.rb +4 -4
- data/lib/msgpack/rpc/transport/tcp.rb +7 -7
- data/lib/msgpack/rpc/transport/udp.rb +1 -1
- data/lib/msgpack/rpc/transport/unix.rb +4 -4
- data/lib/msgpack/rpc/version.rb +1 -1
- metadata +45 -78
data/ChangeLog
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
2012-01-05 version 0.5.0
|
3
3
|
|
4
|
-
*
|
4
|
+
* Replaced Rev with Cool.io
|
5
|
+
* MSGPACK-8 RPC::Address.parse_sockaddr(raw) checks encoding of the string on Ruby 1.9
|
5
6
|
|
6
7
|
2011-04-06 version 0.4.4
|
7
8
|
|
data/lib/msgpack/rpc.rb
CHANGED
data/lib/msgpack/rpc/loop.rb
CHANGED
@@ -19,13 +19,13 @@ module MessagePack
|
|
19
19
|
module RPC
|
20
20
|
|
21
21
|
|
22
|
-
Loop =
|
22
|
+
Loop = Cool.io::Loop
|
23
23
|
|
24
24
|
|
25
25
|
module LoopUtil
|
26
26
|
attr_reader :loop
|
27
27
|
|
28
|
-
class Timer <
|
28
|
+
class Timer < Cool.io::TimerWatcher
|
29
29
|
def initialize(interval, repeating, &block)
|
30
30
|
@block = block
|
31
31
|
super(interval, repeating)
|
@@ -39,7 +39,7 @@ module LoopUtil
|
|
39
39
|
@loop.attach Timer.new(interval, repeating, &block)
|
40
40
|
end
|
41
41
|
|
42
|
-
class TaskQueue <
|
42
|
+
class TaskQueue < Cool.io::AsyncWatcher
|
43
43
|
def initialize
|
44
44
|
@queue = []
|
45
45
|
super
|
@@ -77,7 +77,7 @@ module LoopUtil
|
|
77
77
|
@queue.detach if @queue && @queue.attached?
|
78
78
|
@loop.stop
|
79
79
|
# attach dummy timer
|
80
|
-
@loop.attach
|
80
|
+
@loop.attach Cool.io::TimerWatcher.new(0, false)
|
81
81
|
nil
|
82
82
|
end
|
83
83
|
end
|
@@ -31,13 +31,13 @@ class TCPTransport
|
|
31
31
|
TCPClientTransport.new(session, address, @reconnect_limit)
|
32
32
|
end
|
33
33
|
|
34
|
-
class BasicSocket <
|
34
|
+
class BasicSocket < Cool.io::TCPSocket
|
35
35
|
def initialize(io)
|
36
36
|
super(io)
|
37
37
|
@pac = MessagePack::Unpacker.new
|
38
38
|
end
|
39
39
|
|
40
|
-
# from
|
40
|
+
# from Cool.io::TCPSocket
|
41
41
|
def on_readable
|
42
42
|
super
|
43
43
|
rescue
|
@@ -46,7 +46,7 @@ class TCPTransport
|
|
46
46
|
close
|
47
47
|
end
|
48
48
|
|
49
|
-
# from
|
49
|
+
# from Cool.io::TCPSocket
|
50
50
|
def on_read(data)
|
51
51
|
@pac.feed_each(data) {|obj|
|
52
52
|
on_message(obj)
|
@@ -162,13 +162,13 @@ class TCPClientTransport
|
|
162
162
|
@s.on_response(self, msgid, error, result)
|
163
163
|
end
|
164
164
|
|
165
|
-
# from
|
165
|
+
# from Cool.io::TCPSocket
|
166
166
|
def on_connect
|
167
167
|
return unless @t
|
168
168
|
@t.on_connect(self)
|
169
169
|
end
|
170
170
|
|
171
|
-
# from
|
171
|
+
# from Cool.io::TCPSocket
|
172
172
|
def on_connect_failed
|
173
173
|
return unless @t
|
174
174
|
@t.on_connect_failed(self)
|
@@ -176,7 +176,7 @@ class TCPClientTransport
|
|
176
176
|
nil
|
177
177
|
end
|
178
178
|
|
179
|
-
# from
|
179
|
+
# from Cool.io::TCPSocket
|
180
180
|
def on_close
|
181
181
|
return unless @t
|
182
182
|
@t.on_close(self)
|
@@ -199,7 +199,7 @@ class TCPServerTransport
|
|
199
199
|
def listen(server)
|
200
200
|
@server = server
|
201
201
|
host, port = *@address.unpack
|
202
|
-
@lsock =
|
202
|
+
@lsock = Cool.io::TCPServer.new(host, port, ServerSocket, @server)
|
203
203
|
begin
|
204
204
|
@server.loop.attach(@lsock)
|
205
205
|
rescue
|
@@ -28,13 +28,13 @@ class UNIXTransport
|
|
28
28
|
UNIXClientTransport.new(session, address)
|
29
29
|
end
|
30
30
|
|
31
|
-
class BasicSocket <
|
31
|
+
class BasicSocket < Cool.io::UNIXSocket
|
32
32
|
def initialize(io)
|
33
33
|
super(io)
|
34
34
|
@pac = MessagePack::Unpacker.new
|
35
35
|
end
|
36
36
|
|
37
|
-
# from
|
37
|
+
# from Cool.io::TCPSocket
|
38
38
|
def on_readable
|
39
39
|
super
|
40
40
|
rescue
|
@@ -43,7 +43,7 @@ class UNIXTransport
|
|
43
43
|
close
|
44
44
|
end
|
45
45
|
|
46
|
-
# from
|
46
|
+
# from Cool.io::UNIXSocket
|
47
47
|
def on_read(data)
|
48
48
|
@pac.feed_each(data) {|obj|
|
49
49
|
on_message(obj)
|
@@ -123,7 +123,7 @@ class UNIXServerTransport
|
|
123
123
|
# ServerTransport interface
|
124
124
|
def listen(server)
|
125
125
|
@server = server
|
126
|
-
@lsock =
|
126
|
+
@lsock = Cool.io::UNIXServer.new(@address, ServerSocket, @server)
|
127
127
|
begin
|
128
128
|
@server.loop.attach(@lsock)
|
129
129
|
rescue
|
data/lib/msgpack/rpc/version.rb
CHANGED
metadata
CHANGED
@@ -1,78 +1,55 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: msgpack-rpc
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 4
|
9
|
-
- 5
|
10
|
-
version: 0.4.5
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- FURUHASHI Sadayuki
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-01-06 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: msgpack
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70137101168180 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 7
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
- 4
|
33
|
-
- 4
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
34
21
|
version: 0.4.4
|
35
22
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: rev
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: *70137101168180
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: cool.io
|
27
|
+
requirement: &70137101167260 !ruby/object:Gem::Requirement
|
41
28
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
- 3
|
49
|
-
- 0
|
50
|
-
version: 0.3.0
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.0.0
|
51
33
|
type: :runtime
|
52
|
-
version_requirements: *id002
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: rspec
|
55
34
|
prerelease: false
|
56
|
-
|
35
|
+
version_requirements: *70137101167260
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &70137101166280 !ruby/object:Gem::Requirement
|
57
39
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
|
62
|
-
segments:
|
63
|
-
- 0
|
64
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
65
44
|
type: :development
|
66
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70137101166280
|
67
47
|
description:
|
68
48
|
email: frsyuki@users.sourceforge.jp
|
69
49
|
executables: []
|
70
|
-
|
71
50
|
extensions: []
|
72
|
-
|
73
51
|
extra_rdoc_files: []
|
74
|
-
|
75
|
-
files:
|
52
|
+
files:
|
76
53
|
- AUTHORS
|
77
54
|
- ChangeLog
|
78
55
|
- NOTICE
|
@@ -102,39 +79,29 @@ files:
|
|
102
79
|
- tasks/msgpack_rpc_tasks.rake
|
103
80
|
- test/msgpack_rpc_test.rb
|
104
81
|
- test/test_helper.rb
|
105
|
-
has_rdoc: true
|
106
82
|
homepage: http://msgpack.org/
|
107
83
|
licenses: []
|
108
|
-
|
109
84
|
post_install_message:
|
110
|
-
rdoc_options:
|
111
|
-
|
112
|
-
require_paths:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
113
87
|
- lib
|
114
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
89
|
none: false
|
116
|
-
requirements:
|
117
|
-
- -
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
|
120
|
-
|
121
|
-
- 0
|
122
|
-
version: "0"
|
123
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
95
|
none: false
|
125
|
-
requirements:
|
126
|
-
- -
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
|
129
|
-
segments:
|
130
|
-
- 0
|
131
|
-
version: "0"
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
132
100
|
requirements: []
|
133
|
-
|
134
101
|
rubyforge_project: msgpack
|
135
|
-
rubygems_version: 1.
|
102
|
+
rubygems_version: 1.8.12
|
136
103
|
signing_key:
|
137
104
|
specification_version: 3
|
138
105
|
summary: MessagePack-RPC, asynchronous RPC library using MessagePack
|
139
|
-
test_files:
|
106
|
+
test_files:
|
140
107
|
- test/test_helper.rb
|