Dangerous SNMP
|
This is the (typical) UDP transport. More...
#include <udp.hpp>
Public Member Functions | |
Udp (std::weak_ptr< Context::PrivateData > context, const std::string &connectionString) throw ( Exception ) | |
This instantiates a new UDP transport instance. More... | |
virtual int | socketOptions () const |
When creating a socket, this is called to set the options that should be passed to the call. More... | |
virtual int | protocolNumber () const |
When creating a socket, this is called to set the protocol that should be passed to the call. More... | |
![]() | |
BasicSocketTransport (std::weak_ptr< Context::PrivateData > context) | |
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... | |
bool | send (const std::vector< char > &bytes) |
std::vector< char > | receive (const std::chrono::milliseconds &timeout) |
![]() | |
unsigned int | maximumIncomingMessageSize () |
unsigned int | maximumOutgoingMessageSize () |
void | commitWrite () |
Public Attributes | |
const unsigned int | MINIMUM_MESSAGE_SIZE = 484 |
const unsigned int | RECOMMENDED_MESSAGE_SIZE = 1472 |
![]() | |
std::shared_ptr< ByteStream > | readerStream |
std::shared_ptr< ByteStream > | writerStream |
Additional Inherited Members | |
![]() | |
Transport (std::weak_ptr< Context::PrivateData > context) | |
void | registerReadWriteStreams (int readHandle, int writeHandle) |
void | unregisterReadWriteStreams (int readHandle, int writeHandle) |
![]() | |
int | socketHandle |
This is the socket handle. | |
std::string | address |
This is the address to which to connect. More... | |
std::string | port |
This is the port on which to connect. More... | |
![]() | |
unsigned int | _maximumIncomingMessageSize |
unsigned int | _maximumOutgoingMessageSize |
std::weak_ptr < Context::PrivateData > | context |
This is the (typical) UDP transport.
Udp | ( | std::weak_ptr< Context::PrivateData > | context, |
const std::string & | connectionString | ||
) | |||
throw | ( | Exception | |
) |
This instantiates a new UDP transport instance.
The connection string must be of the form: <address>[:<port>] However, <address> can be an actual IPv4 or IPv6 address, and it can also be a domain name. <port> can be an actual port number or text that will resolve to a port number. If omitted, the port will be 161.
connectionString | The string to use to establish a connection. |
|
virtual |
When creating a socket, this is called to set the protocol that should be passed to the call.
It is the responsibility of the subclass to properly fill this out.
Reimplemented from BasicSocketTransport.
|
virtual |
When creating a socket, this is called to set the options that should be passed to the call.
It is the responsibility of the subclass to properly fill this out.
Reimplemented from BasicSocketTransport.