ServerCore/TCPSocket.h
2021-08-31 17:57:21 -07:00

46 lines
1.0 KiB
C++

#ifndef __TCPSocket_h__
#define __TCPSocket_h__
#include "includes"
#include "Socket.h"
#include "IPAddress.h"
namespace core {
///
/// TCPSocket
///
/// Provides a network TCP socket.
///
/// For accessing TCP network functions use this object. The connection oriented nature of TCP
/// provides a single client persistent connection with data error correction and a durable
/// synchronous data connection.
///
class TCPSocket : public Socket {
public:
TCPSocket(EPoll &ePoll);
TCPSocket(EPoll &ePoll, std::string text);
virtual ~TCPSocket();
void connect(IPAddress &address);
IPAddress ipAddress;
///
/// The output method is called by a socket session (TCPSession) and
/// will output the detail information for the client socket. When extending
/// BMATCPSocket or BMASession you can override the method to add attributes
/// to the list.
///
virtual void output(std::stringstream &out);
};
}
#endif