Skip to content

Commit

Permalink
* ADD [quic] Example of how to set quic stream priority
Browse files Browse the repository at this point in the history
Signed-off-by: Moi Ran <[email protected]>
  • Loading branch information
RanMaoyi committed Nov 10, 2023
1 parent 67b114d commit 823f027
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mqtt/protocol/mqtt/mqtt_quic_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,12 @@ mqtt_quic_ctx_send(void *arg, nni_aio *aio)
if (pub_pipe == NULL) {
log_info("create new pub stream");
nni_lmq_put(s->topic_lmq, msg);
/*
* You can set dialer quic priority before
* dialer_start to create a stream with the
* specified priority.
*/
//nni_dialer_setopt(npipe->p_dialer, NNG_OPT_MQTT_QUIC_PRIORITY, &val, sizeof(int), NNI_TYPE_INT32);
nni_dialer_start(npipe->p_dialer, NNG_FLAG_NONBLOCK);
} else {
if (mqtt_pipe_send_msg(aio, msg, pub_pipe, 0) >= 0) {
Expand Down

0 comments on commit 823f027

Please sign in to comment.