connect.h 530 Bytes
Newer Older
Matthew Burket's avatar
Matthew Burket committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
//
// Created by mburket on 3/29/18.
//

#ifndef COMS352_PROJECT2_PART1_CONNECT_H
#define COMS352_PROJECT2_PART1_CONNECT_H

#include <netdb.h>
#include <unistd.h>
#include <memory.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>

void init_connection(char *hostname, int port, struct addrinfo **info);
int establish_connect(struct addrinfo *info);
int execate_request(int socketfd, char *hostname, char *path);
int get_result(int socketfd, char *recvBuff, int recvBuffSize);

#endif //COMS352_PROJECT2_PART1_CONNECT_H