??xml version="1.0" encoding="utf-8" standalone="yes"?>
PythonHandler django.core.handlers.modpython
modpython.pyq个代码只要修改了之后mod_python重新加载,且这个模块将帔R内存Q好了,可以把他当做一个入口服务实例了Q?br>ice的初始化放在modpython.handler()函数内,通过request参数传递到调用的每个模块内Q?br>开心了Q?br>
]]>
]]>
2
3 2010.3.25 zhangbin
4 1.create,定义game-core的网l接?br> 5
6 协定:
7 1.数据cd名称NdT
8
9 2010.3.27 zhangin
10
11 2010.3.29 zhangbin
12 1. 取消工作单GameWorkSheetTl构
13 2. 修改 ISecureService.auth()安全认证的数据类?br> 14 2010.3.30 zhangbin
15 1. heartbeat()Ud到IService接口
16 */
17
18
19 #ifndef _GTR_ICE
20 #define _GTR_ICE
21
22
23 module gtr {
24
25 dictionary<string,string> HashValueSet;
26 dictionary<string,string> ReturnValueT;
27 sequence<byte> ByteStreamT;
28 sequence<string> StringListT;
29 sequence<HashValueSet> HashValueListT;
30 sequence<int> IntListT;
31 sequence<StringListT> StringListListT;
32
33 struct CallReturnT{
34 bool succ;
35 string msg;
36 HashValueSet props;
37 };
38
39 const int IMAGEJPEG = 1;
40 const int IMAGEPNG =2 ;
41 const int IMAGEBMP = 3 ;
42
43
44 //囑փ数据
45 struct ImageDataT{
46 int type;
47 ByteStreamT bytes;
48 int width;
49 int height;
50 };
51
52 struct GameAuthDataT{
53 int type; // 1- 囄 ,2 - 坐标
54 ImageDataT image; //U宝囄
55 string seckey; //U宝坐标
56 };
57
58
59 struct GameIdentifyT{
60 string id; //游戏~号
61 string tradeNo; //交易单号
62 };
63
64 struct ServiceIdentifyT{
65 string id;
66 string version;
67 };
68
69
70 interface IService{
71 int getType(); //
72 ServiceIdentifyT getId(); //service module id
73 int getTimestamp(); //获取pȝ旉 1970之后U数
74 void shutdown();
75 void heartbeat(string senderType,string senderId); //发送者类型和Id
76 };
77
78 /*
79 enum LogMsgLevelT{
80 logDEBUG,
81 logINFO,
82 logCRITICAL,
83 logERROR
84 };
85 */
86
87 struct LogMessageT{
88 int xclass; //消息cd
89 string msg;
90 };
91
92 //日志功能
93 interface ILogger {
94 void gameMsg(GameIdentifyT gameId,int timetick,LogMessageT msg); // timetick - 1970~ s
95 void gameImage(GameIdentifyT gameId,int timetick,string opName,ImageDataT image); //抓图 opName - 执行游戏步骤名称
96 };
97
98 //安全理Q包括秘宝认证等
99 interface ISecure {
100 string auth(GameIdentifyT gameId,GameAuthDataT data);
101 };
102
103 //日志服务?/span>
104 interface ILogServer extends ILogger,IService{
105
106 };
107
108 interface ISecureServer extends ISecure,IService{
109 };
110
111
112 //一个游戏Q务相关的信息
113 enum GameWorkSheetTypeT{
114 gwsPost, //邮寄
115 gwsAccountAudit, //帐号审核
116 gwsVerify //验证
117 };
118
119
120 //邮寄
121 struct GameWorkSheetPostT {
122 long money;
123 };
124 //审核
125 struct GameWorkSheetAccountAuditT {
126 string any;
127 };
128 //验证
129 struct GameWorkSheetVerifyT {
130 string any;
131 };
132
133 //交易d信息
134 //Tasklet包含所有的业务处理cdQ但同时只有一U有?/span>
135 struct GameTaskletT{
136 string id; //d~号
137 int type; //处理cd
138 string no; //单号
139 string gameId; //游戏~号
140 string account; //帐号
141 string password;
142 string area; //?/span>
143 string server; //服务?/span>
144 string lineName;//U\名称(为空则lineNo)
145 short lineNo; //U\~号
146 string createTime;
147
148 GameWorkSheetPostT post; //邮寄
149 GameWorkSheetAccountAuditT audit;
150 GameWorkSheetVerifyT verify;
151 };
152
153 struct GameTaskResultT{
154 string id; //d~号
155 string no; //单号 (冗余)
156 string gameId; //游戏~号(冗余)
157 int result; //处理l果
158 string errmsg; //提示信息
159 };
160
161 //gtr控制服务端接?/span>
162 interface IGameHost extends IService,ILogger,ISecure{
163 GameTaskletT getTask(); //获取d
164 void completeTask(GameTaskResultT result); //
165
166 };
167
168
169
170 };
171
172
173 #endif
174
175
]]>
发v对客L(fng)的rpc调用Q但如果q接断了呢,client到server的rpch很简单,ice?x)重新发赯接,但之后的server到client?br>rpch׃行了Q这样必要求client再次初始化bid操作Q?br>
2 proxy->addClient(ident);
Limitations
Bidirectional connections have certain limitations:
• They can only be configured for connection-oriented transports such as TCP and SSL.
1168 Connection Management
• Most proxy factory methods have no effect on a proxy created by a connection’s
createProxy operation. The proxy is bound to an existing connection,
therefore the proxy reflects the connection’s configuration. For example, it is
not possible to change the timeout value of such a proxy. Similarly, it is not
possible to change the proxy’s security configuration: if the incoming connection
is secure, then the proxy must be secure, and cannot be changed to be
insecure. However, it is legal to change between oneway and twoway invocations.
• A connection established from a Glacier2 router to a server is not configured
for bidirectional use. Only the connection from a client to the router is bidirectional.
However, the client must not attempt to manually configure a bidirectional
connection to a router, as this is handled internally by the Ice run time.
• Bidirectional connections are not compatible with active connection management
(see Section 37.4).
]]>
支持语言: C++ / Python
计划旉: 2005.12.31 ~ 2006.1.3
2006.1.4 完成rpcServer c++版本