///tcp客户端类
class CTNLuaTcpClient 
{
public:
    CTNLuaTcpClient();
    ~CTNLuaTcpClient();

    ///设置服务器
    void setServer(int port, string ip);

    ///登录
    bool login();

    ///退出
    void logout();

    ///是否已经连接
    bool isLogin();

    ///发送消息,直接发送到服务器,无需返回
    int sendMsg(string msg);

    ///发送XML
    int sendXML(string sMsg, int iNum);

    ///接收消息,直到接收指定的结束符
    int recvMsg(CTNString& sDestMsg, string sEnd = CONST_SEP_06, unsigned int iMaxRecv = 4000);

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

results matching ""

    No results matching ""