From bfb0b426df85efc5485872702b19af7921ff455e Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 26 Jun 2018 19:47:23 -0400 Subject: ... --- include/salticidae/netaddr.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/salticidae/netaddr.h b/include/salticidae/netaddr.h index c166c3a..b11f9b3 100644 --- a/include/salticidae/netaddr.h +++ b/include/salticidae/netaddr.h @@ -31,6 +31,7 @@ #include #include "salticidae/util.h" +#include "salticidae/stream.h" namespace salticidae { @@ -92,6 +93,10 @@ struct NetAddr { } bool is_null() const { return ip == 0 && port == 0; } + + void serialize(DataStream &s) const { s << ip << port; } + + void unserialize(DataStream &s) { s >> ip >> port; } }; } -- cgit v1.2.3-70-g09d2