hch
2025-10-14 193a90f580f5ff6870d906e37821f27d350dc08f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
œÔíhc@sƒddlZddlmZddlmZmZddlZddlmZddl    Z    ddl
Z
dej fd„ƒYZ dS(iÿÿÿÿN(tmylog(t CommonDefinetStat(tPacketDispatchertAsyncoreClientcBsbeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d    „Z RS(
cCsZtjj|ƒ|jtjtjƒtjƒ|_|j    |j_
d|_ t |_ dS(Nt(tasyncoret
dispatchert__init__t create_sockettsockettAF_INETt SOCK_STREAMRt_AsyncoreClient__packDispatchert    onGetPackt OnGetPackett_AsyncoreClient__sendBuftTruet_AsyncoreClient__active(tself((s).\\ServersRoute\NetCore\AsyncoreClient.pyRs     cCstjdƒdS(s×ÓÀàʵÏÖs
unhandled!N(Rtwarning(Rtbuf((s).\\ServersRoute\NetCore\AsyncoreClient.pyRscCs!t|_tjd|jƒdS(Nsconnect %s ok!(RRRtinfotaddr(R((s).\\ServersRoute\NetCore\AsyncoreClient.pythandle_connect"s    cCs ||_dS(N(R(Rt_active((s).\\ServersRoute\NetCore\AsyncoreClient.pyt    SetActive'scCsÉ|js dSyx|jtjƒ}t|ƒdkrB|jƒdStjrttjdt|ƒt    j
|ƒfƒn|j j |ƒWn=t k
rÄ}tjd|jtjƒfƒ|jƒnXdS(Nisrecv len = %s data = %ssget a exception: %s: %s
(RtrecvRtMAX_RECVtlentcloset
DUMPPACKETRtdebugtbinasciitb2a_hexR tonRecvOrginPackett    ExceptionRtmessaget    tracebackt
format_exct
disconnect(RRte((s).\\ServersRoute\NetCore\AsyncoreClient.pyt handle_read*s    
    ) cCs|jƒdS(N(t_AsyncoreClient__processSend(R((s).\\ServersRoute\NetCore\AsyncoreClient.pyt handle_write?scCs7tjd|jƒt|_|jr3|jƒndS(Ns    sock = %s(RRR
tFalseRR(R((s).\\ServersRoute\NetCore\AsyncoreClient.pyt handle_closeBs        cCsm|jj|ƒ}|j|7_t|jƒtjkr_tjdt|jƒtjfƒn|jƒdS(Ns)send buf (len = %s) > (MAX_PACK_LEN = %s)(    R tpackDataRRRt MAX_PACK_LENRRR+(RRtpackBuf((s).\\ServersRoute\NetCore\AsyncoreClient.pytpushSendIs
&cCs7tjd|jƒt|_|jr3|jƒndS(Nsdisconnect sock = %s(RRR
R-RR(R((s).\\ServersRoute\NetCore\AsyncoreClient.pyR(Ps        cCs–|j st|jƒdkr#dStjƒr[ddl}tjd|j|jƒƒn|j    |jƒ}|j||_t
j ƒj |7_ dS(Niiÿÿÿÿsbuf = %s( RRRRtIsDebugR!RR R"tsendRtGetStatt    SendBytes(RR!tsent((s).\\ServersRoute\NetCore\AsyncoreClient.pyt __processSendVs   ( t__name__t
__module__RRRRR*R,R.R2R(R+(((s).\\ServersRoute\NetCore\AsyncoreClient.pyRs    
                                ( RtCommonRtDBCommonRRR!tProtocolRR
R&RR(((s).\\ServersRoute\NetCore\AsyncoreClient.pyt<module>
s