CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
29 class BatchPacketReader;
34 namespace catapult {
namespace ionet {
51 const std::shared_ptr<BatchPacketReader>&
pReader,
52 const std::shared_ptr<PacketIo>& pWriter,
std::shared_ptr< PacketIo > m_pWriter
Definition: SocketReader.cpp:125
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
SocketReader::ReadCallback m_callback
Definition: SocketReader.cpp:128
virtual void read(const ReadCallback &callback)=0
Reads and consumes one or more packets and calls callback on completion.
size_t m_numOutstandingOperations
Definition: SocketReader.cpp:132
std::weak_ptr< PacketReadWriteOperation > m_pOperation
Definition: SocketReader.cpp:173
def warning(*args)
Definition: colorPrint.py:10
size_t m_state
Definition: SocketReader.cpp:133
Reads and consumes packets from a socket.
Definition: SocketReader.h:37
Identifying information about a reader.
Definition: ReaderIdentity.h:28
std::shared_ptr< BatchPacketReader > m_pReader
Definition: SocketReader.cpp:124
virtual ~SocketReader()=default
SocketOperationCode
Enumeration of socket operation results.
Definition: SocketOperationCode.h:50
std::weak_ptr< ChainedSocketReader > pReader
Definition: PacketReaders.cpp:38
const ReaderIdentity & m_identity
Definition: SocketReader.cpp:127
const ServerPacketHandlers & m_handlers
Definition: SocketReader.cpp:126
#define CATAPULT_THROW_RUNTIME_ERROR(MESSAGE)
Macro used to throw a catapult runtime error.
Definition: exceptions.h:167
std::unique_ptr< SocketReader > CreateSocketReader(const std::shared_ptr< BatchPacketReader > &pReader, const std::shared_ptr< PacketIo > &pWriter, const ServerPacketHandlers &handlers, const ReaderIdentity &identity)
Creates a socket packet reader around pReader, pWriter and handlers given a reader identity.
Definition: SocketReader.cpp:179
Definition: AddressExtractionExtension.cpp:28
std::function< void(TArgs...)> consumer
A consumer function.
Definition: functions.h:35
A collection of packet handlers where there is at most one handler per packet type.
Definition: PacketHandlers.h:62
consumer< SocketOperationCode > ReadCallback
Definition: SocketReader.h:39