src/sock_test.h
changeset 42 13cfc41f76a7
parent 41 40f7aa051acb
child 43 42f5dc680930
equal deleted inserted replaced
41:40f7aa051acb 42:13cfc41f76a7
    50     /** non-blocking mode? */
    50     /** non-blocking mode? */
    51     bool nonblocking;
    51     bool nonblocking;
    52 
    52 
    53     /** No more data is going to be added, return EOF once all the rest is consumed */
    53     /** No more data is going to be added, return EOF once all the rest is consumed */
    54     bool eof;
    54     bool eof;
       
    55 
       
    56     /** event flags */
       
    57     int ev_mask;
    55 };
    58 };
    56 
    59 
    57 /**
    60 /**
    58  * Get a sock_stream pointer from a sock_tcp pointer
    61  * Get a sock_stream pointer from a sock_tcp pointer
    59  */
    62  */
    82  * If the EOF flag is given, it indicates that no more data will be added, otherwise the eof status is unchanged.
    85  * If the EOF flag is given, it indicates that no more data will be added, otherwise the eof status is unchanged.
    83  */
    86  */
    84 void sock_test_set_recv_buffer (struct sock_test *sock, struct io_vec *vecs, size_t count, bool eof);
    87 void sock_test_set_recv_buffer (struct sock_test *sock, struct io_vec *vecs, size_t count, bool eof);
    85 
    88 
    86 /**
    89 /**
    87  * Add some data to the recieve buffer
    90  * Add some data to the recieve buffer.
       
    91  *
       
    92  * If events are enabled, they are triggered.
    88  */
    93  */
    89 void sock_test_add_recv_vec (struct sock_test *sock, struct io_vec vec);
    94 void sock_test_add_recv_vec (struct sock_test *sock, struct io_vec vec);
    90 
    95 
    91 /**
    96 /**
    92  * Get the send buffer contents as a single string, free() after use if you care about that
    97  * Get the send buffer contents as a single string, free() after use if you care about that