diff options
Diffstat (limited to 'src/net/vomit.hpp')
-rw-r--r-- | src/net/vomit.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net/vomit.hpp b/src/net/vomit.hpp index 3d3a07f..84c54ac 100644 --- a/src/net/vomit.hpp +++ b/src/net/vomit.hpp @@ -25,6 +25,23 @@ # include "socket.hpp" +// these first three are really in socket.cpp +// but here for cleanliness + +/// Check how much can be read +inline +size_t RFIFOREST(Session *s) +{ + return s->rdata_size - s->rdata_pos; +} + +/// Done reading +void RFIFOSKIP(Session *s, size_t len); + +/// Finish writing +void WFIFOSET(Session *s, size_t len); + + template<class T> uint8_t *pod_addressof_m(T& structure) { |