 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
    1 #ifndef STK_UDPSOCKET_H 
    2 #define STK_UDPSOCKET_H 
   53   int writeBuffer(
const void *buffer, 
long bufferSize, 
int flags = 0);
 
   56   int readBuffer(
void *buffer, 
long bufferSize, 
int flags = 0);
 
   59   int writeBufferTo(
const void *buffer, 
long bufferSize, 
int port, std::string hostname = 
"localhost", 
int flags = 0 );
 
   67   void setAddress( 
struct sockaddr_in *address, 
int port = 2006, std::string hostname = 
"localhost" );
 
   69   struct sockaddr_in address_;
 
 
void setAddress(struct sockaddr_in *address, int port=2006, std::string hostname="localhost")
A protected function for use in writing a socket address structure.
int writeBuffer(const void *buffer, long bufferSize, int flags=0)
Send a buffer to the address specified with the setDestination() function. Returns the number of byte...
int readBuffer(void *buffer, long bufferSize, int flags=0)
Read an input buffer, up to length bufferSize. Returns the number of bytes read or -1 if an error occ...
STK internet socket abstract base class.
Definition: Socket.h:39
void setDestination(int port=2006, std::string hostname="localhost")
Set the address for subsequent outgoing data sent via the writeBuffer() function.
int writeBufferTo(const void *buffer, long bufferSize, int port, std::string hostname="localhost", int flags=0)
Write a buffer to the specified socket. Returns the number of bytes written or -1 if an error occurs.
~UdpSocket()
The class destructor closes the socket instance.
STK UDP socket server/client class.
Definition: UdpSocket.h:32
The STK namespace.
Definition: ADSR.h:6
UdpSocket(int port=2006)
Default constructor creates a local UDP socket on port 2006 (or the specified port number).
int port(void) const
Return the socket port number.
Definition: Socket.h:60