mqtt

a693098385
Posts: 4
Joined: Wed Jul 12, 2017 12:55 pm

mqtt

Postby a693098385 » Mon Aug 14, 2017 10:06 pm

mqtt官方事例mqtt_msg.c第300行左右

Code: Select all


  os_printf("\ncon_buf:%d",strlen(connection->buffer));[b]这输出等于0[/b]
  os_printf("\nmsg长度:%d",connection->message.length);[b]这输出等于3[/b]
  variable_header = (void*)(connection->buffer + connection->message.length);

  os_printf("\nvariable:%d",sizeof(*variable_header));[b]这里为何输出等于10????[/b]

  connection->message.length += sizeof(*variable_header);

  os_printf("\nmsg长度:%d",connection->message.length);[b]这里输出等于13[/b]



Her Majesty
Posts: 202
Joined: Mon Oct 27, 2014 11:09 am

Re: mqtt

Postby Her Majesty » Tue Aug 15, 2017 5:33 pm

请问官方 mqtt 的示例在哪里?

Who is online

Users browsing this forum: Bing [Bot] and 4 guests