dango_generator 0.3.9 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,16 +1,21 @@
1
- Copyright (C) 2007 Keisuke Minami
1
+ Copyright (C) 2007-2008 Keisuke Minami
2
2
 
3
- This library is free software; you can redistribute it and/or
4
- modify it under the terms of the GNU Lesser General Public
5
- License as published by the Free Software Foundation; either
6
- version 2.1 of the License, or (at your option) any later version.
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
7
10
 
8
- This library is distributed in the hope that it will be useful,
9
- but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
- Lesser General Public License for more details.
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
12
13
 
13
- You should have received a copy of the GNU Lesser General Public
14
- License along with this library; if not, write to the Free Software
15
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
21
 
@@ -56,9 +56,6 @@ package org.rubyforge.dango {
56
56
 
57
57
  public var server_time:String = ""; // サーバーの時計
58
58
 
59
- // private var server_host:String = "172.31.1.74";
60
- // private var server_host:String = "localhost";
61
- // private var server_port:int = 15000;
62
59
  private var server_host:String;
63
60
  private var server_port:int;
64
61
  private var is_debug:Boolean = false; // Debugモードかどうかのフラグ
@@ -76,11 +73,12 @@ package org.rubyforge.dango {
76
73
  */
77
74
  public function DangoClientFramework(config:*){
78
75
  trace("DangoClientFramework start...");
76
+ trace("config=" + ObjectUtil.toString(config));
79
77
 
80
78
  // 設定ファイルの読み込み
81
79
  if(config.hasOwnProperty("server_host")){ server_host = config.server_host; }
82
80
  if(config.hasOwnProperty("server_port")){ server_port = config.server_port; }
83
- if(config.hasOwnProperty("is_debug" )){ is_debug = config.debug; }
81
+ if(config.hasOwnProperty("debug" )){ is_debug = config.debug; }
84
82
  if(config.hasOwnProperty("disp_obj" )){ disp_obj = config.disp_obj; }
85
83
  // is_debug = true;
86
84
 
@@ -90,24 +88,24 @@ package org.rubyforge.dango {
90
88
  }
91
89
 
92
90
  var policy_file_protocol:String = config.policy_file_protocol;
93
- // var policy_file_port:uint = config.policy_file_port;
94
- var policy_file_path:String = config.policy_file_path;
91
+ var policy_file_host:String = config.policy_file_host;
92
+ var policy_file_path:String = config.policy_file_path;
95
93
 
94
+ // 環境情報を出力
96
95
  if(is_debug){ trace("flash player: " + Capabilities.version); }
97
96
  if(is_debug){ trace("isDebugger: " + Capabilities.isDebugger); }
98
97
  if(is_debug){ trace("language: " + Capabilities.language); }
99
98
  if(is_debug){ trace("os: " + Capabilities.os); }
100
99
  if(is_debug){ trace("frame_rate: " + frame_rate); }
100
+ if(is_debug){ trace("Security.sandboxType:" + Security.sandboxType); }
101
101
 
102
102
  // Event送出用
103
103
  dispatcher = new EventDispatcher(this);
104
104
 
105
- // Security.sandboxType
106
- if(is_debug){ trace("Security.sandboxType:" + Security.sandboxType); }
107
-
108
105
  // policy_file
109
- // if(!policy_file_protocol){ policy_file_protocol = "http" };
110
- if(!policy_file_path) { policy_file_path = "/crossdomain.xml" };
106
+ if(!policy_file_protocol){ policy_file_protocol = "xmlsocket" };
107
+ if(!policy_file_host) { policy_file_host = server_host };
108
+ if(!policy_file_path) { policy_file_path = "/crossdomain.xml" };
111
109
 
112
110
  // ソケットの生成
113
111
  socket = new Socket();
@@ -126,15 +124,16 @@ package org.rubyforge.dango {
126
124
  if(is_debug){ trace("registered event handling."); }
127
125
 
128
126
  // ポリシーファイルの読み込み
129
- if(policy_file_protocol){
130
- var url_load_policy_file:String;
131
- // url_load_policy_file = "xmlsocket://" + server_host + ":" + server_port;
132
- // url_load_policy_file = "http://aiarebaba.hi-fi-net.com/crossdomain.xml";
133
- url_load_policy_file = "http://" + server_host + policy_file_path;
134
- if(is_debug){ trace("url_load_policy_file=" + url_load_policy_file); }
135
- Security.loadPolicyFile(url_load_policy_file);
127
+ var url_load_policy_file:String;
128
+ if(policy_file_protocol == "xmlsocket"){
129
+ url_load_policy_file = "xmlsocket://" + policy_file_host + ":" + policy_file_host;
130
+ } else if(policy_file_protocol == "http"){
131
+ url_load_policy_file = "http://" + policy_file_host + policy_file_path;
136
132
  }
137
133
 
134
+ if(is_debug){ trace("url_load_policy_file=" + url_load_policy_file); }
135
+ Security.loadPolicyFile(url_load_policy_file);
136
+
138
137
  // 接続
139
138
  try{
140
139
  if(is_debug){ trace("connectiong... host=" + server_host + " port=" + server_port); }
@@ -1,37 +1,10 @@
1
1
  server:
2
- # host: "localhost" # 接続制限ホスト "0.0.0.0"にすれば全接続オッケイ
3
- host: "0.0.0.0" # 接続制限ホスト "0.0.0.0"にすれば全接続オッケイ
4
- max_connections: 10
5
- log_file: log/dango_development.log
6
- log_level: DEBUG
7
- log_max_size: 100000000
8
- log_shift_age: 99
9
- gserver_log_file: log/dango_gserver_development.log
10
- shared_database_manager: MemoryStore
11
- backdoor_host: "127.0.0.1"
12
- thread_sync: true # trueにすると各スレッドが同時動作しなくなる。falseの場合は自分で排他処理を書く場合
13
- debug: true # スレッド終了時に全体停止する
2
+ max_connections: 100
14
3
  safe_resolver: false # require 'resolv-replace'するかどうか。Windowsはtrueにしたほうが安全、Macはfalseにしたほうが安全、UNIXはfalseの方が速いと思う
15
4
  policy_file_request: true # <policy-file-request/>要求に答える(Flashでクロスドメイン処理を行う)
16
- policy_file_allow_domain: # 許可するアクセス元のホスト名(省略時server.host使用)
17
- - localhost
18
- - 127.0.0.1
19
-
20
- check_dango_process_cmd: 'cmd /c "D: && cd D:\dango_sample_chat\trunk\rails && ruby script/dango_server"'
21
-
22
- send_receive_sleep_interval_sec: 0.2 # データ送信時のタイムアウトチェック間隔秒
23
- send_receive_timeout_default_sec: 5.0 # データ送受信時のデフォルトタイムアウト秒数
24
- send_timeout_sec: 4.0 # データ送受信時の送信のタイムアウト秒数
25
- heart_beat_interval_sec: 10.0 # S=>Cのheart beatの送信間隔秒数
26
- heart_beat_response_wait_sec: 10.0 # S=>Cのheart beatの返信待ち秒数
27
-
28
- daemon: false # daemonモード
5
+ daemon: true # daemonモード
29
6
 
30
7
  network:
31
8
  host: localhost
32
9
  port: 15000
33
- # port: 5140
34
-
35
- client:
36
- # host: 172.31.1.74
37
10
 
@@ -1,37 +1,10 @@
1
1
  server:
2
- # host: "localhost" # 接続制限ホスト "0.0.0.0"にすれば全接続オッケイ
3
- host: "0.0.0.0" # 接続制限ホスト "0.0.0.0"にすれば全接続オッケイ
4
2
  max_connections: 100
5
- log_file: log/dango_production.log
6
- log_level: DEBUG
7
- log_max_size: 100000000
8
- log_shift_age: 99
9
- gserver_log_file: log/dango_gserver_production.log
10
- shared_database_manager: MemoryStore
11
- backdoor_host: "127.0.0.1"
12
- thread_sync: true # trueにすると各スレッドが同時動作しなくなる。falseの場合は自分で排他処理を書く場合
13
- debug: true # スレッド終了時に全体停止する
14
3
  safe_resolver: false # require 'resolv-replace'するかどうか。Windowsはtrueにしたほうが安全、Macはfalseにしたほうが安全、UNIXはfalseの方が速いと思う
15
4
  policy_file_request: true # <policy-file-request/>要求に答える(Flashでクロスドメイン処理を行う)
16
- policy_file_allow_domain: # 許可するアクセス元のホスト名(省略時server.host使用)
17
- - localhost
18
- - 127.0.0.1
19
-
20
- check_dango_process_cmd: 'cmd /c "D: && cd D:\dango_sample_chat\trunk\rails && ruby script/dango_server"'
21
-
22
- send_receive_sleep_interval_sec: 0.2 # データ送信時のタイムアウトチェック間隔秒
23
- send_receive_timeout_default_sec: 5.0 # データ送受信時のデフォルトタイムアウト秒数
24
- send_timeout_sec: 4.0 # データ送受信時の送信のタイムアウト秒数
25
- heart_beat_interval_sec: 10.0 # S=>Cのheart beatの送信間隔秒数
26
- heart_beat_response_wait_sec: 10.0 # S=>Cのheart beatの返信待ち秒数
27
-
28
5
  daemon: true # daemonモード
29
6
 
30
7
  network:
31
8
  host: localhost
32
9
  port: 15000
33
- # port: 5140
34
-
35
- client:
36
- # host: 172.31.1.74
37
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dango_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keisuke Minami
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-03 00:00:00 +09:00
12
+ date: 2008-09-11 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency