start SSL
This commit is contained in:
@@ -45,7 +45,6 @@ using std::string;
|
||||
* Class for low level TCP socket operations (open, close, send, receive).
|
||||
*/
|
||||
class TCPSocket {
|
||||
friend class TCPClient;
|
||||
friend class TCPServer;
|
||||
|
||||
private:
|
||||
@@ -62,6 +61,15 @@ class TCPSocket {
|
||||
*/
|
||||
~TCPSocket() { close(m_sfd); }
|
||||
|
||||
/**
|
||||
* initiate a tcp socket connection to a listening server.
|
||||
* @param server the server name or ip address to connect.
|
||||
* @param port the tcp port.
|
||||
* @param timeout the connect, send, and receive timeout in seconds, or 0.
|
||||
* @return pointer to an opened tcp socket.
|
||||
*/
|
||||
static TCPSocket* connect(const string& server, const uint16_t& port, int timeout = 0);
|
||||
|
||||
/**
|
||||
* Write bytes to opened file descriptor.
|
||||
* @param buffer data to send.
|
||||
@@ -125,21 +133,6 @@ class TCPSocket {
|
||||
string m_ip;
|
||||
};
|
||||
|
||||
/**
|
||||
* class to initiate a TCP socket connection to a listening server.
|
||||
*/
|
||||
class TCPClient {
|
||||
public:
|
||||
/**
|
||||
* initiate a tcp socket connection to a listening server.
|
||||
* @param server the server name or ip address to connect.
|
||||
* @param port the tcp port.
|
||||
* @param timeout the connect, send, and receive timeout in seconds, or 0.
|
||||
* @return pointer to an opened tcp socket.
|
||||
*/
|
||||
TCPSocket* connect(const string& server, const uint16_t& port, int timeout = 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* class for a TCP based network server.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user