Optimized Request and Response classes.
This commit is contained in:
@@ -24,9 +24,9 @@ namespace ehs
|
||||
bool connected;
|
||||
|
||||
public:
|
||||
static const UInt_16 HTTPS_Port = 443;
|
||||
static const UInt_16 HTTP_Port = 80;
|
||||
static const UInt_16 MaxHeaderSize = 8192;
|
||||
static constexpr UInt_16 HTTPS_Port = 443;
|
||||
static constexpr UInt_16 HTTP_Port = 80;
|
||||
static constexpr UInt_16 MaxHeaderSize = 8192;
|
||||
|
||||
virtual ~BaseTCP() = default;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace ehs
|
||||
/// @param [in] address The ip address to bind to.
|
||||
/// @param [in] port The port to bind to.
|
||||
/// @note Used for servers.
|
||||
virtual void Bind(const Str_8& address, UInt_16 port) = 0;
|
||||
virtual void Bind(Str_8 address, const UInt_16 &port) = 0;
|
||||
|
||||
/// Listens for new incoming connections.
|
||||
/// @note Used for servers.
|
||||
@@ -63,13 +63,13 @@ namespace ehs
|
||||
|
||||
/// Accepts the new incoming connection.
|
||||
/// @note Used for servers.
|
||||
virtual BaseTCP* Accept() = 0;
|
||||
virtual BaseTCP *Accept() = 0;
|
||||
|
||||
/// Connects to a server at the specified address and port.
|
||||
/// @param [in] address The ip address to connect to.
|
||||
/// @param [in] port The port to connect to.
|
||||
/// @note Used for clients.
|
||||
virtual void Connect(const Str_8& address, UInt_16 port) = 0;
|
||||
virtual void Connect(Str_8 address, const UInt_16 &port) = 0;
|
||||
|
||||
/// Sends data to the connected endpoint.
|
||||
/// @param [in] buffer The data to send to the endpoint.
|
||||
|
Reference in New Issue
Block a user