Dangerous SNMP
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Transport Class Reference

The Transport class represents an abstraction of the transport mechanism behind SNMP. More...

#include <transport.hpp>

Inheritance diagram for Transport:
BasicSocketTransport Tcp Udp

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< ByteStreamreaderStream
 
std::shared_ptr< ByteStreamwriterStream
 

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
 

Detailed Description

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.

Member Function Documentation

virtual void connect ( )
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 void disconnect ( )
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 bool isConnected ( )
virtual

This returns whether or not the transport is connected.

Returns
true if it is connected; false if it is not.

Reimplemented in BasicSocketTransport.


The documentation for this class was generated from the following file: