frnetlib/include/HttpSocket.h
Fred Nicolson 7aced77a00 Added support for sending and receiving HTTP requests.
Added 'HttpSocket', which inherits TcpSocket and adds a receive and send functions for WebRequest objects.

WebRequest objects can be used to parse, construct and extract HTTP requests. They can be sent through HttpSocket's.
2016-12-10 15:11:01 +00:00

36 lines
765 B
C++

//
// Created by fred on 10/12/16.
//
#ifndef FRNETLIB_HTTPSOCKET_H
#define FRNETLIB_HTTPSOCKET_H
#include "TcpSocket.h"
#include "HttpRequest.h"
namespace fr
{
class HttpSocket : public TcpSocket
{
public:
/*!
* Sends a HTTP request to the connected socket.
*
* @param request The request to send
* @return The status of the operation.
*/
Socket::Status receive(HttpRequest &request);
/*!
* Sends a HTTP request to the connected socket.
*
* @param request Where to store the received request.
* @return The status of the operation.
*/
Socket::Status send(const HttpRequest &request);
};
}
#endif //FRNETLIB_HTTPSOCKET_H