dango_generator 0.4.3 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,35 @@
1
+ =begin
2
+ = dangoサーバー
3
+ =end
4
+
5
+ class DangoServer < DangoServerFramework
6
+ # サーバー起動時のインスタンス変数などを定義するメソッド
7
+ # ここで定義されるインスタンス変数はサーバー全体で共有される
8
+ def dango_server_init()
9
+ shared[:sids] = []
10
+ end
11
+
12
+ # クライアント接続時に呼び出されるメソッド
13
+ def dango_connect()
14
+ shared.transaction(:sids) do |sids|
15
+ sids.push(session[:sid])
16
+ shared.commit(sids)
17
+ end
18
+ end
19
+
20
+ # クライアント接続解除時に呼び出されるメソッド
21
+ def dango_close()
22
+ shared.transaction(:sids) do |sids|
23
+ sids.delete(session[:sid])
24
+ shared.commit(sids)
25
+ end
26
+ end
27
+
28
+ # クライアント接続解除時に呼び出されるメソッド
29
+ def dango_receive_send_message(rec_obj)
30
+ send_obj = {:message => rec_obj["message"]}
31
+ send_notice(:notice_message, shared[:sids], send_obj)
32
+ end
33
+ end
34
+
35
+
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.4.3
4
+ version: 0.4.5
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-25 00:00:00 +09:00
12
+ date: 2008-10-04 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -48,8 +48,22 @@ files:
48
48
  - templates/config/dango/test.yml
49
49
  - templates/config/dango/production.yml
50
50
  - templates/config/dango/system_message.yml
51
+ - templates/sample_as3mode/dango/client_swf/bin-debug/sample_as3mode.html
52
+ - templates/sample_as3mode/dango/client_swf/bin-debug/sample_as3mode.swf
53
+ - templates/sample_as3mode/dango/client_swf/bin-debug/AC_OETags.js
54
+ - templates/sample_as3mode/dango/client_swf/bin-debug/playerProductInstall.swf
55
+ - templates/sample_as3mode/dango/client_swf/src/sample_as3mode.mxml
56
+ - templates/sample_as3mode/dango/server/99_dango_server.rb
57
+ - templates/sample_servermode_chat/dango/client_swf/bin-debug/sample_servermode_chat.html
58
+ - templates/sample_servermode_chat/dango/client_swf/bin-debug/sample_servermode_chat.swf
59
+ - templates/sample_servermode_chat/dango/client_swf/bin-debug/AC_OETags.js
60
+ - templates/sample_servermode_chat/dango/client_swf/bin-debug/playerProductInstall.swf
61
+ - templates/sample_servermode_chat/dango/client_swf/src/sample_servermode_chat.mxml
62
+ - templates/sample_servermode_chat/dango/server/99_dango_server.rb
51
63
  - templates/as3corelib-readme.txt
52
64
  - templates/as3corelib-license.txt
65
+ - templates/as3/org/rubyforge/dango/DangoAS3Mode.as
66
+ - templates/as3/org/rubyforge/dango/DangoAS3ModeReceiveEvent.as
53
67
  - templates/as3/org/rubyforge/dango/DangoClientFramework.as
54
68
  - templates/as3/org/rubyforge/dango/DangoError.as
55
69
  - templates/as3/org/rubyforge/dango/DangoErrorCode.as