27 #include <netinet/in.h>
29 using namespace dtn::data;
35 StreamContactHeader::StreamContactHeader()
36 : _flags(REQUEST_ACKNOWLEDGMENTS), _keepalive(0)
41 : _localeid(localeid), _flags(REQUEST_ACKNOWLEDGMENTS), _keepalive(0)
65 stream <<
"dtn!" << TCPCL_VERSION << h.
_flags.
get<
char>();
69 stream.write( (
char*)&ka, 2 );
82 stream.read(magic, 4); magic[4] =
'\0';
83 string str_magic(magic);
85 if (str_magic !=
"dtn!")
91 char version; stream.get(version);
92 if (version != TCPCL_VERSION)
103 stream.
read((
char*)&ka, 2);