dango 0.0.15 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/dango/client_framework.rb +18 -13
- data/lib/dango/server_framework.rb +26 -12
- data/lib/dango/tasks/dango_rake.rb +50 -1
- data/lib/dango/tester/dango_tester_client.rb +94 -64
- data/lib/dango/version.rb +1 -1
- metadata +2 -2
@@ -71,6 +71,7 @@ class DangoClientFramework
|
|
71
71
|
|
72
72
|
# ソケットの準備
|
73
73
|
@sock = nil
|
74
|
+
@is_close = false
|
74
75
|
|
75
76
|
# サーバーへ接続
|
76
77
|
begin
|
@@ -116,19 +117,19 @@ class DangoClientFramework
|
|
116
117
|
end
|
117
118
|
|
118
119
|
# メソッド呼び出し
|
119
|
-
cs_logger.info "calling method=#{ret_obj["notice"].inspect} #{@sid}"
|
120
|
+
cs_logger.info "calling method=#{ret_obj["notice"].inspect} #{@sid} #{Time.now_to_s}"
|
120
121
|
begin
|
121
122
|
__send__("cs_receive_#{ret_obj["notice"]}", ret_obj)
|
122
123
|
rescue
|
123
|
-
cs_logger.error "error in cs_receive_#{ret_obj["notice"]} #{@sid}\n#{error_message($!, 'u')}"
|
124
|
+
cs_logger.error "error in cs_receive_#{ret_obj["notice"]} #{@sid} #{Time.now_to_s}\n#{error_message($!, 'u')}"
|
124
125
|
ensure
|
125
126
|
# データの受信の送信返し
|
126
127
|
response_notice_name = "_response"
|
127
128
|
send_obj = {"_id" => ret_obj["_id"]}
|
128
129
|
cs_client_send_data(response_notice_name, send_obj)
|
129
|
-
cs_logger.debug "response_notice_name=#{response_notice_name.inspect} #{@sid}"
|
130
|
+
cs_logger.debug "response_notice_name=#{response_notice_name.inspect} #{@sid} #{Time.now_to_s}"
|
130
131
|
end
|
131
|
-
cs_logger.debug "called method=#{ret_obj["notice"].inspect} #{@sid}"
|
132
|
+
cs_logger.debug "called method=#{ret_obj["notice"].inspect} #{@sid} #{Time.now_to_s}"
|
132
133
|
|
133
134
|
else
|
134
135
|
sleep 0.01
|
@@ -160,16 +161,20 @@ class DangoClientFramework
|
|
160
161
|
|
161
162
|
# クライアントの終了処理
|
162
163
|
def client_quit()
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
164
|
+
if ! @is_close
|
165
|
+
begin
|
166
|
+
@sock.close if @sock
|
167
|
+
rescue
|
168
|
+
cs_logger.debug "sock close failed. #{$!}"
|
169
|
+
end
|
170
|
+
@sock = nil
|
171
|
+
|
172
|
+
@is_session_closed = true
|
173
|
+
cs_logger.info "calling cs_session_closed()"
|
174
|
+
cs_session_closed() # セッションが切れると呼ばれる処理
|
175
|
+
|
176
|
+
@is_close = true
|
167
177
|
end
|
168
|
-
@sock = nil
|
169
|
-
|
170
|
-
@is_session_closed = true
|
171
|
-
cs_logger.info "calling cs_session_closed()"
|
172
|
-
cs_session_closed() # セッションが切れると呼ばれる処理
|
173
178
|
end
|
174
179
|
private :client_quit
|
175
180
|
|
@@ -17,7 +17,7 @@ class DangoServerFramework
|
|
17
17
|
include DangoFrameworkModule
|
18
18
|
|
19
19
|
SendReceiveSleepIntervalSec = 0.1 # データ送信後の順の際のタイムアウトチェック間隔秒
|
20
|
-
SendReceiveTimeoutDefaultSec = 0
|
20
|
+
SendReceiveTimeoutDefaultSec = 2.0 # データ送受信時のデフォルトタイムアウト秒数
|
21
21
|
SendTimeoutSec = 10.0 # データ送受信時の送信のタイムアウト秒数
|
22
22
|
|
23
23
|
class DangoGServer < GServer
|
@@ -73,6 +73,7 @@ class DangoServerFramework
|
|
73
73
|
set_server_variables() # 各種サーバー仕様の変数設定
|
74
74
|
|
75
75
|
cs_logger.debug("===== server initialize =====") # loggerの準備
|
76
|
+
cs_logger.debug("#{Time.now_to_s}")
|
76
77
|
cs_logger.debug("Process.pid=#{Process.pid}")
|
77
78
|
cs_logger.debug("port=#{@connection_server_port}")
|
78
79
|
cs_logger.debug("host=#{@connection_server_host}")
|
@@ -171,7 +172,7 @@ class DangoServerFramework
|
|
171
172
|
|
172
173
|
# gserver接続開始処理
|
173
174
|
def disconnecting(port)
|
174
|
-
cs_logger.debug "disconnecting:port=#{port}"
|
175
|
+
cs_logger.debug "disconnecting:port=#{port} #{Time.now_to_s}"
|
175
176
|
end
|
176
177
|
|
177
178
|
# gserverのserveメソッド:スレッド開始処理
|
@@ -197,6 +198,11 @@ class DangoServerFramework
|
|
197
198
|
cs_logger.debug "_notice_sid #{sid} #{Time.now_to_s}"
|
198
199
|
# end
|
199
200
|
|
201
|
+
# 誰かが接続したときに60秒以上経った@arr_send_responseを削除
|
202
|
+
@mutex_send_response.synchronize do
|
203
|
+
@arr_send_response.delete_if{|r| r[:time] < Time.now - 60}
|
204
|
+
end
|
205
|
+
|
200
206
|
# メインループ入り
|
201
207
|
loop do
|
202
208
|
if sock.closed?
|
@@ -258,7 +264,8 @@ class DangoServerFramework
|
|
258
264
|
|
259
265
|
end # @mutex_proc_thread.synchronize
|
260
266
|
end
|
261
|
-
|
267
|
+
|
268
|
+
end # loop
|
262
269
|
|
263
270
|
rescue DangoFrameworkReadNoDataError
|
264
271
|
cs_logger.debug "read no data. maybe client closed. #{Thread.current.object_id} #{Time.now_to_s}"
|
@@ -294,8 +301,9 @@ class DangoServerFramework
|
|
294
301
|
|
295
302
|
# action_nameが送信パケットの返事なら
|
296
303
|
def action_name_is_response(ret_obj)
|
304
|
+
# cs_logger.warn "action_name_is_response:#{ret_obj['_id']} #{session[:sid]} #{Time.now_to_s}"
|
297
305
|
@mutex_send_response.synchronize do
|
298
|
-
@arr_send_response.push(ret_obj["_id"])
|
306
|
+
@arr_send_response.push({:_id => ret_obj["_id"], :time => Time.now})
|
299
307
|
end
|
300
308
|
end
|
301
309
|
|
@@ -489,12 +497,11 @@ class DangoServerFramework
|
|
489
497
|
|
490
498
|
sock = socket_list[sid]
|
491
499
|
raise(DangoFrameworkError, "not found sid=#{sid}") if !sock
|
492
|
-
raise(DangoFrameworkConnectionError, "socket closed.
|
500
|
+
raise(DangoFrameworkConnectionError, "socket closed. sid=#{sid}") if sock.closed?
|
493
501
|
|
494
502
|
# cs_logger.debug "cs_server_send_data:sending data notice_name=#{notice_name.inspect}"
|
495
503
|
send_obj_dup = send_obj.deep_dup
|
496
504
|
send_obj_dup["notice"] = notice_name.to_s
|
497
|
-
send_obj_dup["_id"] = Digest::MD5.hexdigest(sid.to_s + Time.now.to_i.to_s)
|
498
505
|
|
499
506
|
# データ送信時にクライアントからのレスポンスを確認する(Flashのバグらしきもの対策)
|
500
507
|
# if notice_name.to_s =~ /^return_/
|
@@ -508,13 +515,16 @@ class DangoServerFramework
|
|
508
515
|
Thread.start do
|
509
516
|
begin
|
510
517
|
mutex_socket_list.synchronize(sid) do
|
511
|
-
cs_logger.
|
518
|
+
# cs_logger.debug "mutex_socket_list:synchronize:#{notice_name} #{sid} #{Time.now_to_s}"
|
519
|
+
|
520
|
+
digest_key = sid.to_s + notice_name.to_s + Time.now.to_f.to_s + rand().to_s
|
521
|
+
send_obj_dup["_id"] = Digest::MD5.hexdigest(digest_key)
|
512
522
|
have_came_response = nil
|
513
523
|
|
514
524
|
receive_thread = Thread.start do
|
515
525
|
begin
|
516
526
|
cs_send_data(sock, send_obj_dup, :type=>dtype) # データ送信
|
517
|
-
cs_logger.debug "cs_server_send_data:sent:notice_name=#{notice_name.inspect} #{sid} #{Time.now_to_s}"
|
527
|
+
# cs_logger.debug "cs_server_send_data:sent:notice_name=#{send_obj_dup['_id']} #{notice_name.inspect} #{sid} #{Time.now_to_s}"
|
518
528
|
rescue DangoFrameworkError
|
519
529
|
cs_logger.debug "ERROR:cs_server_send_data:DangoFrameworkError:notice_name=#{notice_name.inspect} #{sid} #{Time.now_to_s}"
|
520
530
|
end
|
@@ -525,6 +535,7 @@ class DangoServerFramework
|
|
525
535
|
# タイムアウトの場合は
|
526
536
|
cs_logger.warn "cs_server_send_data:send timeout:#{notice_name} #{sid} #{Time.now_to_s}"
|
527
537
|
else
|
538
|
+
# cs_logger.warn "cs_server_send_data:sent after join:#{notice_name} #{sid} #{Time.now_to_s}"
|
528
539
|
end_reserved_time = Time.now + timeout
|
529
540
|
|
530
541
|
# タイムアウトチェック
|
@@ -536,9 +547,11 @@ class DangoServerFramework
|
|
536
547
|
end
|
537
548
|
|
538
549
|
@mutex_send_response.synchronize do
|
539
|
-
|
550
|
+
find_res = @arr_send_response.find{|r| r[:_id] == send_obj_dup["_id"]}
|
551
|
+
|
552
|
+
if find_res
|
553
|
+
@arr_send_response.delete(find_res)
|
540
554
|
have_came_response = true
|
541
|
-
# cs_logger.debug "response check ok:#{notice_name} #{sid} #{Time.now_to_s}"
|
542
555
|
throw(:send_timeout)
|
543
556
|
end
|
544
557
|
end
|
@@ -551,7 +564,7 @@ class DangoServerFramework
|
|
551
564
|
cs_logger.warn "!!! received data is none:#{notice_name} #{sid} #{Time.now_to_s}"
|
552
565
|
end
|
553
566
|
end
|
554
|
-
end
|
567
|
+
end # mutex
|
555
568
|
rescue
|
556
569
|
cs_logger.debug "send_response_thread error:#{error_message($!, 'u')}"
|
557
570
|
end
|
@@ -633,7 +646,8 @@ class DangoServerFramework
|
|
633
646
|
key = $1
|
634
647
|
method_action_notice_shared(key, name, *args)
|
635
648
|
else
|
636
|
-
|
649
|
+
cs_logger.info "method not found. #{name.inspect} #{args.inspect}"
|
650
|
+
raise(NameError, "method not found. #{name.inspect} #{args.inspect}")
|
637
651
|
end
|
638
652
|
end
|
639
653
|
|
@@ -4,10 +4,59 @@ ENV['RAILS_ENV'] = ENV['RAILS_ENV'] || 'development'
|
|
4
4
|
namespace :dango do
|
5
5
|
desc "initialize dango"
|
6
6
|
task :initialize do
|
7
|
+
puts "complete initialize."
|
7
8
|
end
|
8
9
|
|
9
10
|
desc "make swf"
|
10
11
|
task :make_swf do
|
12
|
+
puts "complete make_swf."
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "check dango process"
|
16
|
+
task :check_dango_process do
|
17
|
+
# pidのチェック
|
18
|
+
pid = open("tmp/pids/dango.pid", "rb"){|fh| fh.read }.to_i
|
19
|
+
puts "pid=#{pid}"
|
20
|
+
|
21
|
+
# そのpidのプロセスがあるかのチェック
|
22
|
+
is_pid_exist = nil
|
23
|
+
if RUBY_PLATFORM == 'i386-mswin32'
|
24
|
+
# WbemからProcessIDを取得
|
25
|
+
require "win32ole"
|
26
|
+
begin
|
27
|
+
n_locator = WIN32OLE.new("WbemScripting.SWbemLocator.1")
|
28
|
+
n_service = n_locator.ConnectServer
|
29
|
+
rescue
|
30
|
+
puts "failed connect to Wbem:#{$!.inspect}"
|
31
|
+
return
|
32
|
+
end
|
33
|
+
|
34
|
+
set = n_service.ExecQuery("select Caption, ProcessID from Win32_Process")
|
35
|
+
set.each do |one|
|
36
|
+
# puts(sprintf("Win32_Process %8d %s", one.ProcessID, one.Caption))
|
37
|
+
if one.ProcessID == pid
|
38
|
+
is_pid_exist = true
|
39
|
+
end
|
40
|
+
end
|
41
|
+
else
|
42
|
+
is_pid_exist = FileTest.exist?("/proc/#{pid}")
|
43
|
+
end
|
44
|
+
|
45
|
+
puts "is_pid_exist=#{is_pid_exist}"
|
46
|
+
|
47
|
+
# コンフィグから check_dango_process_cmd を取得
|
48
|
+
config = YAML.load(open("dango/config/#{ENV['RAILS_ENV']}.yml", "rb"){|fh| fh.read})
|
49
|
+
check_dango_process_cmd = config['server']['check_dango_process_cmd'] || nil
|
50
|
+
|
51
|
+
# is_pid_existがないならcheck_dango_process_cmd実行
|
52
|
+
if ! is_pid_exist && check_dango_process_cmd
|
53
|
+
puts "check_dango_process_cmd=#{check_dango_process_cmd}"
|
54
|
+
system(check_dango_process_cmd)
|
55
|
+
end
|
56
|
+
|
57
|
+
check_dango_process_cmd
|
58
|
+
|
59
|
+
puts "complete check_dango_process."
|
11
60
|
end
|
12
61
|
|
13
62
|
namespace :monitor do
|
@@ -56,7 +105,7 @@ namespace :dango do
|
|
56
105
|
p $!.message
|
57
106
|
p $!.backtrace
|
58
107
|
end
|
59
|
-
puts "complete
|
108
|
+
puts "complete send_system_message."
|
60
109
|
end
|
61
110
|
|
62
111
|
end
|
@@ -39,11 +39,22 @@ class DangoTesterClient
|
|
39
39
|
end
|
40
40
|
|
41
41
|
attr_reader(:client_conns)
|
42
|
+
|
43
|
+
def die(str)
|
44
|
+
puts "============ die ============ #{Time.now_to_s}"
|
45
|
+
pp caller()
|
46
|
+
puts str
|
47
|
+
exit 1
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.die(str)
|
51
|
+
die(str)
|
52
|
+
end
|
42
53
|
end
|
43
54
|
|
44
55
|
# テスト接続用のクラス
|
45
56
|
class TestClient < DangoClientFramework
|
46
|
-
SendReceiveSleepIntervalSec = 0.
|
57
|
+
SendReceiveSleepIntervalSec = 0.03 # データ送信後の順の際のタイムアウトチェック間隔秒
|
47
58
|
ReceiveWaitTimeoutSec = 10 # データ受信確認の待ち秒数
|
48
59
|
ReceiveTrapTimeoutSec = 0 # データ受信確認のトラップの秒数
|
49
60
|
|
@@ -55,6 +66,7 @@ class TestClient < DangoClientFramework
|
|
55
66
|
|
56
67
|
@receive_mutex = Mutex.new # 送受信用の排他処理
|
57
68
|
@receive_arr = []
|
69
|
+
@trap_thread_hash = {}
|
58
70
|
|
59
71
|
@receive_methods = []
|
60
72
|
|
@@ -86,99 +98,115 @@ class TestClient < DangoClientFramework
|
|
86
98
|
cs_client_send_data(name, send_obj)
|
87
99
|
end
|
88
100
|
|
89
|
-
#
|
90
|
-
def
|
101
|
+
# trap_receive
|
102
|
+
def trap_receive(receive_name, options = {})
|
91
103
|
cs_logger.debug "trap_receive_data:#{receive_name}:#{Time.now_to_s}"
|
92
104
|
timeout = options[:timeout] || ReceiveTrapTimeoutSec
|
93
105
|
trap_proc = options[:proc] || nil
|
94
106
|
raise(ArgumentError, ":proc is not Proc class.") if trap_proc && ! trap_proc.is_a?(Proc)
|
95
107
|
|
96
|
-
|
108
|
+
# 戻ってきたデータのチェックメソッド
|
109
|
+
receive_name_sym = (receive_name.class == Symbol) ? (":"+receive_name.to_s) : ('"'+receive_name+'"')
|
97
110
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
def self.#{instance_method_name}(ret_obj)
|
113
|
-
cs_logger.debug "ret_obj:" + ret_obj.inspect
|
114
|
-
send_receive_shared[#{receive_name_sym}] = ret_obj
|
115
|
-
end
|
116
|
-
EOF
|
117
|
-
instance_eval expr
|
118
|
-
@receive_methods.push(receive_name_sym)
|
119
|
-
end
|
111
|
+
if ! @receive_methods.include?(receive_name_sym)
|
112
|
+
instance_method_name = "cs_receive_#{receive_name}"
|
113
|
+
expr = <<-EOF
|
114
|
+
def self.#{instance_method_name}(ret_obj)
|
115
|
+
cs_logger.debug "ret_obj:" + ret_obj.inspect + " " + Time.now_to_s
|
116
|
+
send_receive_shared[#{receive_name_sym}] = ret_obj
|
117
|
+
end
|
118
|
+
EOF
|
119
|
+
instance_eval expr
|
120
|
+
@receive_methods.push(receive_name_sym)
|
121
|
+
end
|
122
|
+
|
123
|
+
# @trap_thread_hashにスレッド登録
|
124
|
+
if ! @trap_thread_hash.has_key?(receive_name)
|
120
125
|
|
121
|
-
#
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
+
# スレッド開始
|
127
|
+
th = Thread.start do
|
128
|
+
send_receive_shared[receive_name] = nil
|
129
|
+
if timeout == 0
|
130
|
+
end_reserved_time = Time.at(0) # 0ならepochを入れる
|
131
|
+
else
|
132
|
+
end_reserved_time = Time.now + timeout # 0以上ならタイムアウト時間決定
|
133
|
+
end
|
126
134
|
|
127
|
-
|
128
|
-
|
135
|
+
# タイムアウトチェック
|
136
|
+
loop do
|
137
|
+
if end_reserved_time != Time.at(0) && end_reserved_time < Time.now
|
138
|
+
raise(DangoFrameworkTimeoutError, "timeout:timeout_sec=#{timeout}:\nclient_name=#{@client_name}(#{self.sid}):\nreceive_name=#{receive_name} \n#{Time.now_to_s}")
|
139
|
+
end
|
140
|
+
|
141
|
+
# 戻ってきたデータがあれば
|
142
|
+
if send_receive_shared[receive_name]
|
143
|
+
cs_logger.debug "receive_name:#{send_receive_shared[receive_name].inspect} #{Time.now_to_s}"
|
144
|
+
break
|
145
|
+
end
|
146
|
+
|
147
|
+
sleep SendReceiveSleepIntervalSec # スリープ
|
129
148
|
end
|
130
149
|
|
131
|
-
#
|
132
|
-
if send_receive_shared[receive_name]
|
133
|
-
|
134
|
-
break
|
150
|
+
# 戻ってきたデータがあるかどうかチェック
|
151
|
+
if !send_receive_shared[receive_name]
|
152
|
+
raise(DangoFrameworkError, "received data is none. sid=#{sid} receive_name=#{receive_name}")
|
135
153
|
end
|
136
154
|
|
137
|
-
|
138
|
-
|
155
|
+
# :procが設定されている場合は、それを呼び出す
|
156
|
+
if trap_proc
|
157
|
+
cs_logger.debug "trap_receive_data:trap_proc:#{trap_proc.inspect} #{Time.now_to_s}"
|
158
|
+
trap_proc.call(send_receive_shared[receive_name])
|
159
|
+
|
160
|
+
# :procが設定されていなければ、wait用に@receive_arrに入れておく
|
161
|
+
else
|
162
|
+
@receive_mutex.synchronize do
|
163
|
+
cs_logger.debug "receive_name:#{receive_name}:#{send_receive_shared[receive_name].inspect} #{Time.now_to_s}"
|
164
|
+
@receive_arr.push([receive_name, send_receive_shared[receive_name]])
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end # Thread
|
139
168
|
|
140
|
-
|
141
|
-
|
142
|
-
if !send_receive_shared[receive_name]
|
143
|
-
raise(DangoFrameworkError, "received data is none. sid=#{sid} receive_name=#{receive_name}")
|
144
|
-
end
|
169
|
+
@trap_thread_hash[receive_name] = th
|
170
|
+
else
|
145
171
|
|
146
|
-
|
147
|
-
cs_logger.debug "trap_receive_data:222:#{receive_name}:#{trap_proc.inspect}"
|
148
|
-
if trap_proc
|
149
|
-
cs_logger.debug "trap_receive_data:333:#{receive_name}"
|
150
|
-
cs_logger.debug "trap_receive_data:trap_proc is true:#{trap_proc.inspect}"
|
151
|
-
trap_proc.call(send_receive_shared[receive_name])
|
152
|
-
|
153
|
-
# :procが設定されていなければ、wait用に@receive_arrに入れておく
|
154
|
-
else
|
155
|
-
cs_logger.debug "trap_receive_data:444"
|
156
|
-
@receive_mutex.synchronize do
|
157
|
-
cs_logger.debug "receive_name:#{receive_name}:#{send_receive_shared[receive_name].inspect}"
|
158
|
-
@receive_arr.push([receive_name, send_receive_shared[receive_name]])
|
159
|
-
end
|
160
|
-
end
|
172
|
+
cs_logger.debug "trap_receive_data:already register trap:receive_name:#{receive_name} #{Time.now_to_s}"
|
161
173
|
end
|
174
|
+
|
175
|
+
end
|
176
|
+
|
177
|
+
# cancel trap_receive
|
178
|
+
def cancel_trap_receive(receive_name, options = {})
|
179
|
+
cs_logger.debug "cancel_trap_receive:#{receive_name}:#{Time.now_to_s}"
|
180
|
+
|
181
|
+
@trap_thread_hash[receive_name].kill
|
182
|
+
|
183
|
+
@trap_thread_hash.delete(receive_name)
|
162
184
|
end
|
163
185
|
|
164
|
-
#
|
165
|
-
def
|
186
|
+
# wait_receive
|
187
|
+
def wait_receive(receive_name, options = {})
|
188
|
+
cs_logger.debug "wait_receive_data:#{receive_name}:#{Time.now_to_s}"
|
166
189
|
timeout = options[:timeout] || ReceiveWaitTimeoutSec
|
167
190
|
|
168
191
|
# データ受信待ち
|
169
192
|
receive_data = nil
|
170
|
-
|
193
|
+
|
194
|
+
end_reserved_time = Time.now + timeout # 0以上ならタイムアウト時間決定
|
195
|
+
|
196
|
+
loop do
|
171
197
|
@receive_mutex.synchronize do
|
172
198
|
receive_data = @receive_arr.find{|r| r[0] == receive_name}.deep_dup
|
173
|
-
# p @receive_arr
|
174
199
|
end
|
200
|
+
|
175
201
|
break if receive_data != nil
|
202
|
+
break if end_reserved_time < Time.now
|
203
|
+
|
176
204
|
sleep SendReceiveSleepIntervalSec # スリープ
|
177
205
|
end
|
178
206
|
|
179
207
|
# タイムアウトなら
|
180
208
|
if receive_data == nil
|
181
|
-
raise(DangoFrameworkTimeoutError, "timeout:
|
209
|
+
raise(DangoFrameworkTimeoutError, "timeout:timeout_sec=#{timeout}:\nclient_name=#{@client_name}(#{self.sid})\:receive_name=#{receive_name} \n#{Time.now_to_s}")
|
182
210
|
end
|
183
211
|
|
184
212
|
# 結果を削除しておく
|
@@ -186,6 +214,8 @@ class TestClient < DangoClientFramework
|
|
186
214
|
@receive_arr.delete_if{|r| r[0] == receive_name}
|
187
215
|
end
|
188
216
|
|
217
|
+
@trap_thread_hash.delete(receive_name)
|
218
|
+
|
189
219
|
receive_data[1]
|
190
220
|
end
|
191
221
|
|
data/lib/dango/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: dango
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2007-10-
|
6
|
+
version: 0.0.18
|
7
|
+
date: 2007-10-22 00:00:00 +09:00
|
8
8
|
summary: Ruby - Flash conneciton network flamework
|
9
9
|
require_paths:
|
10
10
|
- lib
|