源代码如下:
int transport_getdata(unsigned char* buf, int count)
{
int rc = recv(mysock, buf, count, 0);
//printf("transport_getdata-received %d bytes count %dn", rc, (int)count);
return rc;
}
打印出来rc=-1,count=1
if (MQTTPacket_read(buf, buflen, transport_getdata) == CONNACK)
永远跳到else,exit就退出去了。