Dangerous SNMP
|
The Transport class represents an abstraction of the transport mechanism behind SNMP. More...
#include <transport.hpp>
Public Member Functions | |
unsigned int | maximumIncomingMessageSize () |
unsigned int | maximumOutgoingMessageSize () |
virtual bool | isConnected () |
This returns whether or not the transport is connected. More... | |
virtual void | connect () |
This instructs the transport to connect to its endpoint. More... | |
virtual void | disconnect () |
This shuts down the transport (if it was already connected). More... | |
void | commitWrite () |
Public Attributes | |
std::shared_ptr< ByteStream > | readerStream |
std::shared_ptr< ByteStream > | writerStream |
Protected Member Functions | |
Transport (std::weak_ptr< Context::PrivateData > context) | |
void | registerReadWriteStreams (int readHandle, int writeHandle) |
void | unregisterReadWriteStreams (int readHandle, int writeHandle) |
Protected Attributes | |
unsigned int | _maximumIncomingMessageSize |
unsigned int | _maximumOutgoingMessageSize |
std::weak_ptr < Context::PrivateData > | context |
The Transport class represents an abstraction of the transport mechanism behind SNMP.
This class is abstract and cannot be used. Any actual transport must subclass this and implement the required methods.
In this way, we will not bind SNMP to any one particular transport, allowing it to be flexible and extensible.
|
virtual |
This instructs the transport to connect to its endpoint.
This may or may not succeed; to check for success, call "isConnected" afterward.
Reimplemented in BasicSocketTransport.
|
virtual |
This shuts down the transport (if it was already connected).
If the transport was not connected, then this does nothing.
Reimplemented in BasicSocketTransport.
|
virtual |
This returns whether or not the transport is connected.
Reimplemented in BasicSocketTransport.