summaryrefslogtreecommitdiff
path: root/src/net/vomit.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-05-18 02:43:55 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-05-19 17:10:09 -0700
commit2410aeb608329ed57a31315effdfd5a751788616 (patch)
tree4b961100e9aec99c16c6ccae7f1857e763d58b14 /src/net/vomit.hpp
parentfccd01bd0fba297531595b51ffb8db044ed6f22c (diff)
downloadtmwa-2410aeb608329ed57a31315effdfd5a751788616.tar.gz
tmwa-2410aeb608329ed57a31315effdfd5a751788616.tar.bz2
tmwa-2410aeb608329ed57a31315effdfd5a751788616.tar.xz
tmwa-2410aeb608329ed57a31315effdfd5a751788616.zip
Convert login/char and login/admin server components to proto-v2
Diffstat (limited to 'src/net/vomit.hpp')
-rw-r--r--src/net/vomit.hpp17
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)
{