dango 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
data/README.txt CHANGED
@@ -1,4 +1,4 @@
1
- = dango -- Ruby - Flash conneciton network flamework
1
+ = dango -- Realtime communications network framework for Ruby and Flash on Rails.
2
2
 
3
3
 
4
4
  == Download
@@ -26,6 +26,7 @@ Download and install dango with the following.
26
26
  == dango References
27
27
 
28
28
  * dango Project Page: http://rubyforge.org/projects/dango
29
+ * dango Download Page: http://rubyforge.org/projects/dango
29
30
  * dango API Documents: http://dango.rubyforge.org
30
31
 
31
32
  == Simple Example
@@ -147,20 +147,25 @@ module DangoFrameworkModule
147
147
 
148
148
  raise(DangoFrameworkReadNoDataError, "sid=#{Thread.current.object_id}:size_str=#{size_str.inspect}") if size_str == ""
149
149
 
150
+ ## Flash のpolicyファイルだった場合(特殊)
151
+ if size_str == "<polic"
152
+ cs_logger.debug "size_str=#{size_str.inspect}"
153
+ receive_data = sock.recv(18)
154
+ cs_logger.debug "receive_data=#{receive_data}"
155
+ raise(DangoFrameworkFlashPolicyError)
156
+ end
157
+
158
+ ## サイズとデータタイプを取得
150
159
  dtype, size = size_str[0, 5].unpack("cN")
151
160
 
152
- raise(DangoFrameworkConnectionError, "sid=#{Thread.current.object_id}:size=#{size}:size_str=#{size_str.inspect}") if size == nil || size == 0
161
+ ## データが小さすぎる場合
162
+ if size == nil || size == 0
163
+ raise(DangoFrameworkConnectionError, "sid=#{Thread.current.object_id}:size=#{size}:size_str=#{size_str.inspect}")
164
+ end
153
165
 
154
- ## Flash のpolicyファイルだった場合(特殊)
155
- if size == 1886350441
156
- cs_logger.debug "size=#{size}:size_str=#{size_str.inspect}"
157
- receive_data = sock.recv(20)
158
- cs_logger.debug "receive_data=#{receive_data}"
159
- if size_str + receive_data =~ /^\<policy\-file\-request/ # <policy-file-request/>なら
160
- raise(DangoFrameworkFlashPolicyError)
161
- else # そうじゃなきゃ普通のエラー
162
- raise(DangoFrameworkConnectionError, "too big... size=#{size}:size_str=#{size_str.inspect}")
163
- end
166
+ ## データが大きすぎる場合
167
+ if size >= 1886350441
168
+ raise(DangoFrameworkConnectionError, "too big... size=#{size}:size_str=#{size_str.inspect}")
164
169
  end
165
170
 
166
171
  # cs_logger.debug "size=#{size}:size_str=#{size_str.inspect}"
@@ -219,10 +219,12 @@ class DangoServerFramework
219
219
  end
220
220
 
221
221
  if is_flash_policy_file && @policy_file_request # Flashのポリシーファイルが来たら
222
- cs_logger.debug "is_flash_policy_file"
223
- policy_data = '<cross-domain-policy><allow-access-from domain="*" to-ports="*" /></cross-domain-policy>'
224
- sock.send(policy_data, 0)
222
+ cs_logger.debug "is_flash_policy_file #{sid} #{Time.now_to_s}"
223
+ policy_data = '<?xml version="1.0"?><cross-domain-policy><allow-access-from domain="*" to-ports="*" /></cross-domain-policy>' + "\0" + "\n"
224
+ cs_logger.debug policy_data
225
+ sock.write policy_data
225
226
  sock.flush
227
+ sleep 1
226
228
  raise(DangoFrameworkFlashPolicyError, "policy file sent. disconnectiong...")
227
229
 
228
230
  elsif ret_obj == {} # 受信データがなければ
data/lib/dango/version.rb CHANGED
@@ -2,7 +2,7 @@ module Dango #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 19
5
+ TINY = 20
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -3,15 +3,15 @@ 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.19
7
- date: 2007-10-24 00:00:00 +09:00
8
- summary: Ruby - Flash conneciton network flamework
6
+ version: 0.0.20
7
+ date: 2007-10-25 00:00:00 +09:00
8
+ summary: Realtime communications network framework for Ruby and Flash on Rails.
9
9
  require_paths:
10
10
  - lib
11
11
  email: keisuke@rccn.com
12
12
  homepage: http://dango.rubyforge.org
13
13
  rubyforge_project: dango
14
- description: Ruby - Flash conneciton network flamework
14
+ description: Realtime communications network framework for Ruby and Flash on Rails.
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin