#include <UDPEndpoint.h>
Inheritance diagram for UDPEndpoint:
Public Member Functions | |
UDPEndpoint (int sendBufferSize=2048, int receiveBufferSize=2048) | |
~UDPEndpoint () | |
int | bind (int listenPort) |
binds endpoint to listen to port | |
int | bind (int listenPort, char *address, int sendPort) |
binds endpoint to listen to port and sets receiving host to address:port | |
int | bind (Port listenPort, IPAddress address, Port sendPort) |
int | send (int size) |
sends data from the shared buffer (does no copy of data and assumes that the Data is in sharedSendBuffer | |
int | send (int size, char *addr, int sPort) |
sends data from the shared buffer to a givern host/port | |
int | send (void *data, int size) |
sends data to last specified other host (copies the data) | |
int | send (void *data, int size, char *address, int port) |
sends data to other host | |
int | send (void *data, int size, IPAddress address, int port) |
sends data to other host | |
virtual void | onReceive (void *data, int size) |
Called when new data arrives. | |
virtual void | onClose () |
Called from close() when connection closes. | |
virtual void | onSendingDone () |
void | close () |
Closes Endpoint in case of an error. | |
const char * | getErrorString (UDPEndpointError error) |
gets errorString of error | |
const char * | getErrorString () |
gets errorString of last error | |
virtual void | sendCont (antEnvMsg *msg) |
called by the framwork is sending is done | |
virtual void | receiveCont (antEnvMsg *msg) |
called by the framweok if there is new data | |
virtual void | closeCont (antEnvMsg *msg) |
does cleanup-stuff | |
Protected Attributes | |
IPAddress | ipOfLastPackage |
Ip of the last package recieved. | |
Private Member Functions | |
void | startReceiving () |
Private Attributes | |
IPAddress | address |
IP address to send the data to. | |
Port | sendPort |
port to send the data to | |
Port | listenPort |
port to listen for data |
Definition at line 17 of file UDPEndpoint.h.
|
Definition at line 16 of file UDPEndpoint.cpp. |
|
Definition at line 33 of file UDPEndpoint.cpp. References close(). |
Here is the call graph for this function:
|
binds endpoint to listen to port
Definition at line 39 of file UDPEndpoint.cpp. References getErrorString(), listenPort, and startReceiving(). Referenced by bind(), DDPHandler::initDDPHandler(), and UDPHandler::start(). |
Here is the call graph for this function:
|
binds endpoint to listen to port and sets receiving host to address:port
Definition at line 65 of file UDPEndpoint.cpp. |
Here is the call graph for this function:
|
Definition at line 56 of file UDPEndpoint.cpp. |
Here is the call graph for this function:
|
sends data from the shared buffer (does no copy of data and assumes that the Data is in sharedSendBuffer
Definition at line 82 of file UDPEndpoint.cpp. References sendPort. Referenced by send(), DDPHandler::sendDDPPackage(), and UDPHandlerEndpoint::sendPackage(). |
|
sends data from the shared buffer to a givern host/port
Definition at line 90 of file UDPEndpoint.cpp. |
Here is the call graph for this function:
|
sends data to last specified other host (copies the data)
Definition at line 74 of file UDPEndpoint.cpp. References send(). |
Here is the call graph for this function:
|
sends data to other host
Definition at line 99 of file UDPEndpoint.cpp. |
Here is the call graph for this function:
|
sends data to other host
Definition at line 107 of file UDPEndpoint.cpp. |
Here is the call graph for this function:
|
Called when new data arrives.
Reimplemented in DDPHandler, and UDPHandlerEndpoint. Definition at line 134 of file UDPEndpoint.cpp. Referenced by receiveCont(). |
|
Called from close() when connection closes.
Definition at line 173 of file UDPEndpoint.cpp. Referenced by close(). |
|
Reimplemented in UDPHandlerEndpoint. Definition at line 130 of file UDPEndpoint.cpp. Referenced by sendCont(). |
|
Closes Endpoint in case of an error.
Definition at line 164 of file UDPEndpoint.cpp. References onClose(). Referenced by ~UDPEndpoint(). |
Here is the call graph for this function:
|
gets errorString of error
Definition at line 184 of file UDPEndpoint.cpp. |
|
gets errorString of last error
Referenced by bind(), receiveCont(), and sendCont(). |
|
called by the framwork is sending is done
Reimplemented from IPEndpoint. Definition at line 115 of file UDPEndpoint.cpp. References getErrorString(), and onSendingDone(). |
Here is the call graph for this function:
|
called by the framweok if there is new data Actually calls onReceive() Reimplemented from IPEndpoint. Definition at line 149 of file UDPEndpoint.cpp. References getErrorString(), ipOfLastPackage, onReceive(), and startReceiving(). |
Here is the call graph for this function:
|
does cleanup-stuff
Reimplemented from IPEndpoint. Definition at line 177 of file UDPEndpoint.cpp. |
|
Definition at line 140 of file UDPEndpoint.cpp. Referenced by bind(), and receiveCont(). |
|
Ip of the last package recieved.
Definition at line 65 of file UDPEndpoint.h. Referenced by receiveCont(). |
|
IP address to send the data to.
Definition at line 68 of file UDPEndpoint.h. |
|
port to send the data to
Definition at line 69 of file UDPEndpoint.h. |
|
port to listen for data
Definition at line 70 of file UDPEndpoint.h. Referenced by bind(). |