cs-3516-assignment-1/client/http_socket.h

20 lines
489 B
C
Raw Normal View History

2018-08-27 16:51:35 +00:00
#ifndef HTTP_SOCKET_H
#define HTTP_SOCKET_H
2018-08-30 01:57:35 +00:00
#include "../common/http_types.h"
2018-09-03 02:46:42 +00:00
#include "../common/socket_helper.h"
#include <time.h>
2018-08-27 16:51:35 +00:00
#define HTTP_VERSION "HTTP/1.1"
2018-09-03 02:46:42 +00:00
struct response_info {
char *contents;
long long rtt;
};
2018-08-27 17:16:59 +00:00
struct http_message build_basic_request(const char *method, const char *host, const char *path, int port);
void free_basic_request(struct http_message req);
enum socket_result send_request(struct http_message req, struct response_info *res_info);
2018-08-27 16:51:35 +00:00
#endif