]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
comm point write and read structure members.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 25 Jun 2020 11:06:21 +0000 (13:06 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 25 Jun 2020 11:06:21 +0000 (13:06 +0200)
util/netevent.h

index 0198554685b20280bd7194d326099c10db87123a..c044f8938dcefebb1a090f4935e275d0ad7961ca 100644 (file)
@@ -87,6 +87,9 @@ typedef int comm_point_callback_type(struct comm_point*, void*, int,
 #define NETEVENT_CAPSFAIL -3
 /** to pass done transfer to callback function; http file is complete */
 #define NETEVENT_DONE -4
+/** to pass write of the write packet is done to callback function
+ * used when tcp_write_and_read is enabled */
+#define NETEVENT_PKT_WRITTEN -5
 
 /** timeout to slow accept calls when not possible, in msec. */
 #define NETEVENT_SLOW_ACCEPT_TIME 2000
@@ -254,6 +257,12 @@ struct comm_point {
         * tcp_write_and_read is enabled */
        size_t tcp_write_byte_count;
 
+       /** packet to write currently over the write channel. for when
+        * tcp_write_and_read is enabled */
+       uint8_t* tcp_write_pkt;
+       /** length of tcp_write_pkt in bytes */
+       size_t tcp_write_pkt_len;
+
        /** if set, read/write completes:
                read/write state of tcp is toggled.
                buffer reset/bytecount reset.