1
Lacewing::EventPump pump;
        Lacewing::Client* client = new Lacewing::Client(pump);
        client->Tag = this;
        client->onReceive(onReceiveEx);
        client->onConnect(onConnectEx);

        Lacewing::Address adb("127.0.0.1",12581,Lacewing::Address.HINT_IPv4);
        client->Connect(adb);
        pump.StartEventLoop();

这个我的代码,客户端成功连接到服务器并且onConnectEx按预期调用,但onReceiveEx没有调用!!!客户没有收到任何东西,为什么?

4

1 回答 1

0

If ReceiveEx is not called, it means that the server has not sent any data to your client. You should ensure that your server is sending data to clients that connect to it - if not, then you should not expect ReceiveEx to be called and this is normal behavior.

于 2013-04-08T18:16:09.043 回答