ServerCore/TCPSocket.h
2019-02-07 13:28:21 -08:00

45 lines
992 B
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();
void connect(IPAddress &address);
IPAddress ipAddress;
///
/// The output method is called by a socket session (BMASession) 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