I was told olny the computer / home that the "host program" was in needed to be port forwarded, but you need port forwarding just to use the client too.
Base code for client program:
//Main.cpp
#include <iostream>
#include "Socket.h"
#include <fstream>
#include <string>
using namespace std;
string getcot(char *fnam)
{
char joe[2000];
string pao;
ifstream file (fnam, ios::in);
if (file.is_open())
{
cout<<"Writing.\n";
while(!file.eof())
{
file.getline(joe,2000);
cout << joe << "\n";
}
file.close();
pao = static_cast<std::string>(joe);
return pao;
}
}
int main()
{
int choice;
int port = 4521;
//char *ipAddress = "127.0.0.1";
string ipAddress;
bool done = false;
char recMessage[STRLEN];
char sendMessage[STRLEN];
//Client
string wait;
cout<<"Azjherbeniex Hetnev Version 0.2\n\n";
cout<<"Input anything and press enter.\n";
cout<<"This lets us know you are here...\n";
cin>>wait;
cout<<"\n192.168.1.122\n";
ClientSocket sockClient;
cout<<"ATTEMPTING TO CONNECT..."<<endl;
cout<<"IP:\n";
string ipsas;
cin>>ipsas;
sockClient.ConnectToServer(ipsas.c_str(), port );
//Connected
//74.76.149.190
while ( !done )
{
cout<<"Page: ";
sockClient.GetAndSendMessage();
cout<<"\t--WAIT--"<<endl;
system("cls");
sockClient.RecvData( recMessage, STRLEN );
cout<<recMessage<<endl;
cout<<"\n\n\n\n\n";
}
}