]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.h
Add meshlink_set_channel_flags().
[meshlink] / src / meshlink.h
index 1acd99b0663bd021ba6fc70a4e0ecfcb48ff319a..b3ccf8f0cf9b4ade4de87f28c15a36e2536d8cdd 100644 (file)
@@ -1381,6 +1381,19 @@ void meshlink_set_channel_sndbuf(struct meshlink_handle *mesh, struct meshlink_c
  */
 void meshlink_set_channel_rcvbuf(struct meshlink_handle *mesh, struct meshlink_channel *channel, size_t size);
 
+/// Set the flags of a channel.
+/** This function allows changing some of the channel flags.
+ *  Currently only MESHLINK_CHANNEL_NO_PARTIAL and MESHLINK_CHANNEL_DROP_LATE are supported, other flags are ignored.
+ *  These flags only affect the local side of the channel with the peer.
+ *  The changes take effect immediately.
+ *
+ *  \memberof meshlink_channel
+ *  @param mesh      A handle which represents an instance of MeshLink.
+ *  @param channel   A handle for the channel.
+ *  @param flags     A bitwise-or'd combination of flags that set the semantics for this channel.
+ */
+void meshlink_set_channel_flags(struct meshlink_handle *mesh, struct meshlink_channel *channel, uint32_t flags);
+
 /// Open a reliable stream channel to another node.
 /** This function is called whenever a remote node wants to open a channel to the local node.
  *  The application then has to decide whether to accept or reject this channel.