• [手游新项目历程]第4天-PushFramework资料


    介绍资料:

    http://www.pushframework.com/  点击打开链接

    codeproject 点击打开链接


    buffer.Append((char*)strData.c_str(), strData.size());

    这里是有问题的,如果strData不是字符串获得的长度可能是错误的,最好自己指定大小 buffer.Append((char*)strData.c_str(), size);


    PushFramework函数理解


    接受消息函数 OnReceiveComplete
    派发收到的消息 dispatchRequest
    注册一个服务器 registerService
    包结构 class PUSHFRAMEWORK_API DataBuffer
    前段连接服务器
    bool Acceptor::handleAcceptedSocket( SOCKET clientSocket, SOCKADDR_IN address )
    发包给前段
    pChannel->PushPacket(pOutPacket);
    消息监听函数
    void DemuxImpl::proc()
    打包解包
    bool WebsocketDataMessage::Decode()
    bool WebsocketDataMessage::Encode()
    收到第一个包
    bool AbstractDistributor::CheckMergeNewInsertedItems()
    ProcessFirstPacket 
    --前段连接
    void BroadcastStreamerManager::AddClient( LogicalConnection* pLogicalConnection )
    断开连接
    void BroadcastStreamer::AddItem( ItemPtr pItem )
    发送消息  打包函数
    int WebsocketProtocol::frameOutgoingPacket
    发送消息  发送函数
    bool PhysicalConnection::WriteBytes() 
    服务器消息函数回调
    pHandler->handle(pClient, &packet);

  • 相关阅读:
    线段树区间最大子段和
    NTT数论变换
    cdq分治·三维偏序问题
    线段树区间开方
    怎么联系$zcy$呢?
    题解 CF375D 【Tree and Queries】
    点分治模板
    Good Bye 2018题解
    Hello 2019题解
    Codeforces Round #525 (Div. 2)题解
  • 原文地址:https://www.cnblogs.com/byfei/p/14104291.html
Copyright © 2020-2023  润新知