 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
    1 #ifndef STK_TCPCLIENT_H 
    2 #define STK_TCPCLIENT_H 
   51   int connect( 
int port, std::string hostname = 
"localhost" );
 
   54   int writeBuffer(
const void *buffer, 
long bufferSize, 
int flags = 0);
 
   57   int readBuffer(
void *buffer, 
long bufferSize, 
int flags = 0);
 
 
int writeBuffer(const void *buffer, long bufferSize, int flags=0)
Write a buffer over the socket connection. Returns the number of bytes written or -1 if an error occu...
TcpClient(int port, std::string hostname="localhost")
Default class constructor creates a socket client connection to the specified host and port.
STK internet socket abstract base class.
Definition: Socket.h:38
~TcpClient()
The class destructor closes the socket instance, breaking any existing connections.
int connect(int port, std::string hostname="localhost")
Connect the socket client to the specified host and port and returns the resulting socket descriptor.
STK TCP socket client class.
Definition: TcpClient.h:33
int readBuffer(void *buffer, long bufferSize, int flags=0)
Read a buffer from the socket connection, up to length bufferSize. Returns the number of bytes read o...
The STK namespace.
Definition: ADSR.h:6
int port(void) const
Return the socket port number.
Definition: Socket.h:60