]> git.meshlink.io Git - meshlink/blobdiff - src/utcp_priv.h
Wake up the MeshLink thread if framed channel data is pending to be flushed.
[meshlink] / src / utcp_priv.h
index 197fd2685a32416f46bc87652ddae5bb27664553..8702e30f8de37496f4f7b5714c2d6d5d857a7da2 100644 (file)
@@ -42,7 +42,7 @@
 #define DEFAULT_RCVBUFSIZE 0
 #define DEFAULT_MAXRCVBUFSIZE 131072
 
-#define MAX_UNRELIABLE_SIZE 65536
+#define MAX_UNRELIABLE_SIZE 65535
 #define DEFAULT_MTU 1000
 
 #define USEC_PER_SEC 1000000L
@@ -109,6 +109,7 @@ struct utcp_connection {
 
        bool reapable;
        bool do_poll;
+       bool flush_needed;
 
        // Callbacks
 
@@ -137,6 +138,7 @@ struct utcp_connection {
                uint32_t irs;
        } rcv;
 
+       uint32_t frame_offset;
        int dupack;
 
        // Timers
@@ -190,6 +192,7 @@ struct utcp {
        uint16_t mtu; // The maximum size of a UTCP packet, including headers.
        uint16_t mss; // The maximum size of the payload of a UTCP packet.
        int timeout; // sec
+       int flush_timeout; // milliseconds
 
        // Connection management