Lines Matching defs:nwsi
1265 * the nwsi, and we succeeded to create a new
1268 * Since others may join us sharing the nwsi,
1271 * define the lifecycle of the nwsi... it means
1273 * being both the nwsi and act like a child
1275 * nwsi duties and turn our wsi into a child of
1276 * the nwsi with its own lifecycle.
1278 * The nwsi gets a mostly empty wsi->nwsi used
1301 wsi->told_user_closed = 1; /* don't tell nwsi closed */
1312 wsi->mqtt = lws_zalloc(sizeof(*wsi->mqtt), "nwsi mqtt");
1333 lwsl_notice("%s: migrated nwsi %s to sid 1 %s\n",
1578 struct lws *nwsi = lws_get_network_wsi(w);
1582 * remove the topic from nwsi
1584 lws_mqtt_client_remove_subs(nwsi->mqtt);
1962 struct lws *nwsi = lws_get_network_wsi(wsi);
2044 nwsi->mqtt->pkt_id++;
2045 wsi->mqtt->ack_pkt_id = pub->packet_id = nwsi->mqtt->pkt_id;
2062 nwsi->mqtt->inside_payload = wsi->mqtt->inside_payload = 1;
2068 if (lws_write(nwsi, start, lws_ptr_diff_size_t(p, start), LWS_WRITE_BINARY) !=
2081 wsi->mqtt->inside_payload = nwsi->mqtt->inside_payload = 0;
2124 struct lws *nwsi = lws_get_network_wsi(wsi);
2147 * the shared nwsi may already be subscribed to some or all of
2150 * have ones that are new to the nwsi. If nothing left, we just
2162 mysub = lws_mqtt_find_sub(nwsi->mqtt, sub->topic[n].name);
2180 * It turns out there's nothing to do here, the nwsi has
2235 wsi->mqtt->ack_pkt_id = sub->packet_id = ++nwsi->mqtt->pkt_id;
2240 nwsi->mqtt->client.aws_iot = wsi->mqtt->client.aws_iot;
2251 /* if the nwsi already has it, don't ask server for it */
2253 lwsl_info("%s: topics[%d] \"%s\" exists in nwsi\n",
2259 * Attach the topic we're subscribing to, to nwsi->mqtt
2260 * so we know the nwsi itself has a subscription to it
2263 if (!lws_mqtt_create_sub(nwsi->mqtt, sub->topic[n].name))
2295 if (lws_write(nwsi, start, lws_ptr_diff_size_t(p, start), LWS_WRITE_BINARY) !=
2310 struct lws *nwsi = lws_get_network_wsi(wsi);
2326 mysub = lws_mqtt_find_sub(nwsi->mqtt,
2339 * The nwsi still has other subscribers bound to the
2405 wsi->mqtt->ack_pkt_id = ++nwsi->mqtt->pkt_id;
2410 nwsi->mqtt->client.aws_iot = wsi->mqtt->client.aws_iot;
2448 if (lws_write(nwsi, start, lws_ptr_diff_size_t(p, start), LWS_WRITE_BINARY) !=