Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | List of all members
UdpClient Class Reference

Public Member Functions

 UdpClient (int aPort, const char *aServerName)
 
bool setup (int aPort, const char *aServerName)
 
void cleanup ()
 
void setPort (int aPort)
 
void setServer (const char *aServerName)
 
int send (void *message, int size)
 
int write (const char *remoteHostname, int remotePortNumber, void *sourceBuffer, int numBytesToWrite)
 
int waitUntilReady (bool readyForReading, int timeoutMsecs)
 
int setSocketBroadcast (int broadcastEnable)
 

Member Function Documentation

void UdpClient::setPort ( int  aPort)

Sets the port.

Sets the port on the destination server.

Parameters
aPortthe destineation port.
void UdpClient::setServer ( const char *  aServerName)

Sets the server.

Sets the IP address of the destinatioon server.

Parameters
aServerNamethe IP address of the destination server
int UdpClient::send ( void *  message,
int  size 
)

Sends a packet.

Sends a UPD packet to the destination server on the destination port.

Parameters
messageA pointer to the location in memory which contains the message to be sent.
sizeThe number of bytes to be read from memory and sent to the destination.
Returns
the number of bytes sent or -1 if an error occurred.

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