resonance 1.0.1
Loading...
Searching...
No Matches
transportaddress.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/hxstr.h"
4
5class IBStream;
6class OBStream;
7
21public:
32 TransportAddress(const HxStr &host, const HxStr &address, const HxStr &service, int nPort);
33
41
51 virtual void Save(OBStream &stream);
52
62 virtual void Load(IBStream &stream);
63
72
81
90
91private:
92 HxStr mHost; // +0x00
93 HxStr mAddress; // +0x08
94 HxStr mService; // +0x10
95 int mPort; // +0x18
96};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Input half of the byte stream interface.
Definition ibstream.h:36
Output half of the byte stream interface.
Definition obstream.h:25
virtual void Load(IBStream &stream)
Read back what Save() writes, through LoadHxStr() and a four-byte read.
HxStr GetService()
Report a copy of the third string.
TransportAddress(const HxStr &host, const HxStr &address, const HxStr &service, int nPort)
Construct from copies of the three strings and the word.
HxStr GetAddress()
Report a copy of the second string.
virtual ~TransportAddress()
Slot 1.
HxStr GetHost()
Report a copy of the first string.
virtual void Save(OBStream &stream)
Write the three strings through SaveHxStr() and then the word, as four bytes.