« first day (547 days earlier)      last day (653 days later) » 

3:36 AM
> /*
* File: Socket.cpp
* Author: levi
*
* Created on January 12, 2012, 8:01 PM
*/

#include "Socket.hpp"

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>

Socket::Socket(char* hostname, int Port) : port(Port) {
this->hostname = hostname;
}

Socket::Socket(const Socket& orig) {
}

Socket::~Socket() {
close(this->socket);
}

int Socket::connect() {
struct hostent* hostEnt = gethostbyname(this->hostname);
> Socket.cpp:38:29: error: ‘AF_NET’ was not declared in this scope
 

« first day (547 days earlier)      last day (653 days later) »