1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›hc@s{ddlmZddlZddlmZddlmZmZmZddl    m
Z
m Z dejfd„ƒYZ dS(iÿÿÿÿ(tmylogN(tAsynServerClient(tSingletonObjectt CommonDefineterror(tSendPackProtocolt
MMORPGPacktMongoDBServerClientcBs,eZd„Zd„Zd„Zd„ZRS(cCs)tjj|||||ƒ||_dS(N(Rt__init__t_MongoDBServerClient__recvQueue(tselftsocktaddrtOnCloset    recvQueuet notifyPrepare((s*.\\ServersRoute\Net\MongoDBServerClient.pyRscCsátjr&tjdtj|ƒƒntjƒjƒ}d|j    |ƒkr‰t
j dt
j dƒ}tj
|ƒtjƒj |ƒdS|j|jƒtjd|jjƒƒ|jj|ƒtjd|jjƒƒdS(s»ñµÃ²ð½âºóµÄ·â°üsbuf = %siÿÿÿÿRserror in pack.readDataNsbefore put:recv queue cnt = %ssafter put:recv queue cnt = %s(Rt
DUMPPACKETRtdebugtbinasciitb2a_hexRt getPackPooltalloctreadDataRt    formatMsgt ERROR_NO_135tfreet setSessionIDt    sessionIDR    tqsizetput(R
tbuftpacktmsg((s*.\\ServersRoute\Net\MongoDBServerClient.pyt OnGetPackets     cCsÞtjƒ}tj|_tjƒjƒ}|j|j    j
ƒƒd|j ƒ_ d|j ƒ_ tj|j ƒ_tj|j ƒ_tj|j ƒ_|j|jƒƒ|j|jƒƒtjƒj|ƒtjdƒdS(NisSend OK!(RttagDataServerInitOKRtdgDataServerPrepareOKtTypeRRRtsetSendViaSocketIDtsockettfilenot getPackHeadRt    poolIndextatInnerttypeRtstRoutet
dstSvrTypet stCenterGatet
srcSvrTypet    setBuffert    GetBuffertpushSendt getPackDataRRtinfo(R
t packDBInitOKtsendPack((s*.\\ServersRoute\Net\MongoDBServerClient.pytnotifyRouteServerDBPrepareOK's  cCsVtjƒ}|j|ƒ|jƒjtjkr?|jƒdStjj    ||ƒdS(N(
RtMMORPGPacket_StackRR(R+Rt atDisconnectt
disconnectRR2(R
RR((s*.\\ServersRoute\Net\MongoDBServerClient.pyR28s   
(t__name__t
__module__RR!R7R2(((s*.\\ServersRoute\Net\MongoDBServerClient.pyRs            ( tCommonRRtNetCoreRtDBCommonRRRtProtocolRRR(((s*.\\ServersRoute\Net\MongoDBServerClient.pyt<module>s