CatapultServer
v0.5.0.1 (Elephant)
|
An interface for reading and writing packets. More...
Public Types | |
using | ReadCallback = consumer< SocketOperationCode, const Packet * > |
using | WriteCallback = consumer< SocketOperationCode > |
Public Member Functions | |
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... | |
An interface for reading and writing packets.
using catapult::ionet::PacketIo::ReadCallback = consumer<SocketOperationCode, const Packet*> |
|
virtualdefault |
|
pure virtual |
Reads and consumes the next packet and calls callback on completion. On success, the read packet is passed to callback.
|
pure virtual |
Writes payload and calls callback on completion.