CatapultServer
v0.5.0.1 (Elephant)
|
Classes | |
struct | Stats |
Statistics about a socket. More... | |
Public Types | |
using | StatsCallback = consumer< const Stats & > |
Public Types inherited from catapult::ionet::PacketIo | |
using | ReadCallback = consumer< SocketOperationCode, const Packet * > |
using | WriteCallback = consumer< SocketOperationCode > |
Public Member Functions | |
virtual | ~PacketSocket ()=default |
virtual void | stats (const StatsCallback &callback)=0 |
Retrieves statistics about this socket and passes them to callback. More... | |
virtual void | close ()=0 |
Closes the socket. More... | |
virtual std::shared_ptr< PacketIo > | buffered ()=0 |
Gets a buffered interface to the packet socket. More... | |
Public Member Functions inherited from catapult::ionet::PacketIo | |
virtual | ~PacketIo ()=default |
virtual void | read (const ReadCallback &callback)=0 |
virtual void | write (const PacketPayload &payload, const WriteCallback &callback)=0 |
Writes payload and calls callback on completion. More... | |
Public Member Functions inherited from catapult::ionet::BatchPacketReader | |
virtual | ~BatchPacketReader ()=default |
virtual void | readMultiple (const PacketIo::ReadCallback &callback)=0 |
An asio socket wrapper that natively supports packets. This wrapper is threadsafe but does not prevent interleaving reads or writes.
using catapult::ionet::PacketSocket::StatsCallback = consumer<const Stats&> |
|
virtualdefault |
|
pure virtual |
Gets a buffered interface to the packet socket.
|
pure virtual |
Closes the socket.
|
pure virtual |
Retrieves statistics about this socket and passes them to callback.