GS dealing with the network

Source: Internet
Author: User

dealing with the network in Gs,gc,share all work with the network, but still GC most GC dealing process Send_stat Basechannel::sendcmdtry () {if(!m_quecmd.size ())returnSend_stat::send_succeed;  for(;;) {        if(M_quecmd.empty ()) Break; DATAPKT PKT=M_quecmd.front (); {Send_stat hr= M_pdatalayer->senddata (M_nchannelid, Pkt.pdata, pkt.nsize);//The GC doesn't have anything to do with the network .            if(HR! =send_stat::send_succeed) {                //put the wait queue, let GS to sendM_pshare->pushgcwait (m_nchannelid); returnhr;        }} m_quecmd.pop (); M_pshare-pushpkt (Pkt.pdata, pkt.nsize); }    returnSend_stat::send_succeed;} Share:voidShare::onturntoclient (intNchannelid,void* PData,intNlen) {M_pdatalayer->senddata (Nchannelid, PData, Nlen);//share, this layer doesn't even know what it means.}gs:gs this side with the network actually not much, is fixed several places M_spdatalayer->close (Nchannelid);//Kicking players offlineGetbuffernum ()//get the number of buffer packages

GS dealing with the network

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.