Interface that provides methods available on UDP communication endpoints.
More...
#include <Network.h>
|
class | cCallbacks |
| Interface for the callbacks for events that can happen on the endpoint. More...
|
|
|
virtual void | Close (void)=0 |
| Closes the underlying socket. More...
|
|
virtual void | EnableBroadcasts (void)=0 |
| Marks the socket as capable of sending broadcast, using whatever OS API is needed. More...
|
|
virtual UInt16 | GetPort (void) const =0 |
| Returns the local port to which the underlying socket is bound. More...
|
|
virtual bool | IsOpen (void) const =0 |
| Returns true if the endpoint is open. More...
|
|
virtual bool | Send (const AString &a_Payload, const AString &a_Host, UInt16 a_Port)=0 |
| Sends the specified payload in a single UDP datagram to the specified host + port combination. More...
|
|
virtual | ~cUDPEndpoint () |
|
Interface that provides methods available on UDP communication endpoints.
Definition at line 175 of file Network.h.
◆ ~cUDPEndpoint()
virtual cUDPEndpoint::~cUDPEndpoint |
( |
| ) |
|
|
inlinevirtual |
◆ cUDPEndpoint()
cUDPEndpoint::cUDPEndpoint |
( |
cCallbacks & |
a_Callbacks | ) |
|
|
inlineprotected |
Creates a new instance of an endpoint, with the specified callbacks.
Definition at line 220 of file Network.h.
◆ Close()
virtual void cUDPEndpoint::Close |
( |
void |
| ) |
|
|
pure virtual |
Closes the underlying socket.
Note that there still might be callbacks in-flight after this method returns.
Implemented in cUDPEndpointImpl.
◆ EnableBroadcasts()
virtual void cUDPEndpoint::EnableBroadcasts |
( |
void |
| ) |
|
|
pure virtual |
Marks the socket as capable of sending broadcast, using whatever OS API is needed.
Without this call, sending to a broadcast address using Send() may fail.
Implemented in cUDPEndpointImpl.
◆ GetPort()
virtual UInt16 cUDPEndpoint::GetPort |
( |
void |
| ) |
const |
|
pure virtual |
Returns the local port to which the underlying socket is bound.
Implemented in cUDPEndpointImpl.
◆ IsOpen()
virtual bool cUDPEndpoint::IsOpen |
( |
void |
| ) |
const |
|
pure virtual |
◆ Send()
virtual bool cUDPEndpoint::Send |
( |
const AString & |
a_Payload, |
|
|
const AString & |
a_Host, |
|
|
UInt16 |
a_Port |
|
) |
| |
|
pure virtual |
Sends the specified payload in a single UDP datagram to the specified host + port combination.
Note that in order to send to a broadcast address, you need to call EnableBroadcasts() first.
Implemented in cUDPEndpointImpl.
◆ m_Callbacks
The callbacks used for various events on the endpoint.
Definition at line 216 of file Network.h.
The documentation for this class was generated from the following file: