class CTNLuaTcpServer
{
public:
    CTNLuaTcpServer();
    ~CTNLuaTcpServer();

    void setPort(int iPort);
    //异步等待客户端连接
    virtual void startAccept();

    //获取全部会话
    void getSessions(CSelectHelp& help);
    ///
    bool getSession(const string& sID, CIntent& it);

    ///true ASC模式,false BIN模式
    void setAsc(bool bAsc);

    bool close();
    int send(string sID,string sMsg);
    int sendHex(string sID, string sHex);
    int size();
    void run();
    void runAsThread();

    void setLuaID(int iID);
    //处理函数
    //参数类型 const string& sID, char* buf,int iLen
    void setProcessFunc(const string& sFunc);

};
Copyright © TouchNet 2015 all right reserved,powered by Gitbook最后修订时间: 2022-06-21 09:21:04

results matching ""

    No results matching ""