#include "INet4Address.h"



INet4Address::INet4Address()
{
}


INet4Address::INet4Address(char* add, int port)
{
	//Zero the entire address structure (use memset)
	//Set the sin_family attribute to IPv4 (AF_INET)
	//Set the port - remember host/network byte ordering
	//Set the address - use presentation to network
	//Set the length attribute (use sizeof)
}

INet4Address::INet4Address(int port)
{
	//Similar to the above, but set the address (using sinaddr.s_addr) to INADDR_ANY
	//Note: INADDR_ANY is a long, currently in host format.  Remember to convert it!
}


INet4Address::~INet4Address()
{
	//Nothing here :)
}

sockaddr_in *INet4Address::GetSockaddrRef()
{
	//Pointer to structure

}

size_t *INet4Address::GetSocketAddressLengthRef()
{
	//Pointer to length of structure

}

size_t INet4Address::GetSocketAddressLengthVal()
{
	//Value length of structure

}

void INet4Address::GetSocketAddress(char* cstr, int len)
{
	//Address as a string - note, uses the cstr parameter.
	//This should use the network to presentation call - cstr is the buffer, len is the length
	//Don't overthink this - this function is likely only a single call to inet_ntop

}

std::string INet4Address::GetSocketAddress()
{
	//Make a character array of the size of the maximum address string length - defined by INET_ADDRSTRLEN


	//Call GetSocketAddress using the array/length


	//Convert the character array to a std::string (can be done in the string's constructor) and return it

}

int INet4Address::GetPort()
{
	//Return the port.  Remember, convert to host byte order
}

void INet4Address::Print()
{
	//For debugging
	//Print (using cout) the address and port in the format:
	//192.168.0.1:1000
	//Remember, you can use the functions you've already written to help
	//Don't forget host byte ordering for the port
}