libinet++
A networking library for humans that code in C++
 All Classes Functions
Socket Class Reference

Public Member Functions

 Socket ()
 
 Socket (std::string _server, unsigned int _port, HandlerCallback _handler_callback)
 
void connect ()
 
void connect (std::string server, unsigned int port, HandlerCallback _handler_callback)
 
void * receive ()
 
int send_data (std::string data)
 
void close_connection ()
 

Constructor & Destructor Documentation

Socket::Socket ( )

Constructs an incomplete Socket object.

Member Function Documentation

void Socket::close_connection ( )

Closes the connection if it's connected.

void Socket::connect ( )

Connects to the server.

void * Socket::receive ( )

Handles the information that was received from the server.

int Socket::send_data ( std::string  data)

Send the data string to the server.

Returns
Number of bytes sent.

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