dango 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dango/framework_base.rb +6 -0
- data/lib/dango/server_framework.rb +36 -38
- data/lib/dango/version.rb +1 -1
- metadata +5 -3
data/lib/dango/framework_base.rb
CHANGED
@@ -161,52 +161,50 @@ class DangoServerFramework
|
|
161
161
|
|
162
162
|
# サーバー開始処理
|
163
163
|
def server_start()
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
164
|
+
begin
|
165
|
+
set_server_variables() # 各種サーバー仕様の変数設定
|
166
|
+
|
167
|
+
logger.warn("===== server initialize =====") # loggerの準備
|
168
|
+
logger.warn("network_port=#{@network_port}")
|
169
|
+
logger.warn("network_host=#{@network_host}")
|
170
|
+
logger.warn("server_host=#{@server_host}")
|
171
|
+
logger.warn("max_connections=#{@server_max_connections}")
|
172
|
+
logger.warn("RAILS_ENV=#{RAILS_ENV}")
|
173
|
+
logger.warn("Process.pid=#{Process.pid}")
|
174
|
+
logger.warn("Dango Version=#{Dango::VERSION::STRING}")
|
174
175
|
# logger.debug("$LOADED_FEATURES=#{$LOADED_FEATURES.pretty_inspect}")
|
175
176
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
gc_thread_start() # GCスレッドの開始
|
177
|
+
@session_manager = SessionManager.new # セッション情報の初期化
|
178
|
+
shared_init() # 共有メモリを初期化
|
179
|
+
socket_list_init() # ソケット一覧を初期化
|
180
|
+
mutex_socket_list_init() # ソケット毎用のmutexを初期化
|
181
|
+
@mutex_proc_thread = Mutex.new # スレッドが同時起動しないようにするためのMutex
|
182
|
+
heart_beat_thread_start() # ハートビートスレッドの開始
|
183
|
+
gc_thread_start() # GCスレッドの開始
|
184
184
|
|
185
|
-
|
186
|
-
@arr_send_response = [] # 送信レスポンス用のキャッシュ
|
185
|
+
dango_server_init() # 初期設定読み込み
|
187
186
|
|
188
|
-
|
189
|
-
|
187
|
+
@mutex_send_response = Mutex.new # 送信レスポンス用のMutex
|
188
|
+
@arr_send_response = [] # 送信レスポンス用のキャッシュ
|
189
|
+
|
190
|
+
TCPSocket.do_not_reverse_lookup = true # 逆引きを行わない
|
191
|
+
# TCPSocket.do_not_reverse_lookup = false # 逆引きを行う
|
190
192
|
|
191
|
-
|
192
|
-
|
193
|
-
|
193
|
+
@gserver = DangoGServer.new(self, @network_port, @server_host, @server_max_connections)
|
194
|
+
@gserver.audit = true # Turn logging on.
|
195
|
+
@gserver.debug = true # debug
|
194
196
|
|
195
|
-
if @gserver_log_file && @gserver_log_file != ""
|
196
197
|
gserver_log_fh = open(@gserver_log_file, "a")
|
197
198
|
@gserver.stdlog = gserver_log_fh
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
open(@pid_file, "wb"){|fh| fh.write Process.pid.to_s } # pidをファイルに保存
|
203
|
-
|
204
|
-
begin
|
199
|
+
|
200
|
+
GC.disable
|
201
|
+
open(@pid_file, "wb"){|fh| fh.write Process.pid.to_s } # pidをファイルに保存
|
202
|
+
|
205
203
|
@gserver.start
|
204
|
+
|
206
205
|
rescue Exception
|
207
|
-
|
208
|
-
|
209
|
-
puts error_msg
|
206
|
+
error_print("#{error_message($!, 'u')}")
|
207
|
+
exit
|
210
208
|
end
|
211
209
|
end
|
212
210
|
|
@@ -246,7 +244,7 @@ class DangoServerFramework
|
|
246
244
|
begin
|
247
245
|
load f[:file]
|
248
246
|
rescue Exception
|
249
|
-
debug_print("#{
|
247
|
+
debug_print("#{error_message($!, 'u')}")
|
250
248
|
end
|
251
249
|
end
|
252
250
|
|
@@ -257,7 +255,7 @@ class DangoServerFramework
|
|
257
255
|
server_start() # サーバー開始
|
258
256
|
end
|
259
257
|
rescue Exception
|
260
|
-
|
258
|
+
error_print("#{error_message($!, 'u')}")
|
261
259
|
end
|
262
260
|
end
|
263
261
|
|
data/lib/dango/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dango
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keisuke Minami
|
@@ -9,11 +9,12 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-06-
|
12
|
+
date: 2008-06-26 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
17
|
+
type: :runtime
|
17
18
|
version_requirement:
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
19
20
|
requirements:
|
@@ -23,6 +24,7 @@ dependencies:
|
|
23
24
|
version:
|
24
25
|
- !ruby/object:Gem::Dependency
|
25
26
|
name: dango_generator
|
27
|
+
type: :runtime
|
26
28
|
version_requirement:
|
27
29
|
version_requirements: !ruby/object:Gem::Requirement
|
28
30
|
requirements:
|
@@ -88,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
90
|
requirements: []
|
89
91
|
|
90
92
|
rubyforge_project: dango
|
91
|
-
rubygems_version: 1.
|
93
|
+
rubygems_version: 1.2.0
|
92
94
|
signing_key:
|
93
95
|
specification_version: 2
|
94
96
|
summary: Realtime communications network framework for Ruby and Flash on Rails.
|