First I'd like to warn you, this might be a dumb question.
I'm trying to just set up a simple connection between my computer and the one next to me. I am starting with this program (which I found, I didn't write it)
host
// Dark GDK - The Game Creators - www.thegamecreators.com
// Simple Telnet style server for MultiSync.
//
//
//
//
#include <DarkGDK.h>
#include "multisync.h"
#define MAX_CONNECTED 16 // Begin with modest goals.
char MultiSyncServerName[] = "MultiSync Basic Server for GDK v0.alpha";
char serverip[] = "127.0.0.1";
char tempstr[256];
bool connected = false;
int connection = 0;
int connections = 0;
int playerleft = 0;
void DarkGDK(void)
{
dbSyncOn();
dbSyncRate(60);
dbPositionCamera(10, 10, -20);
NetSetPort(23);
if (!NetHost(MAX_CONNECTED))
{
NetGetError(tempstr, 256);
MessageBox(NULL, tempstr, MultiSyncServerName, MB_ICONEXCLAMATION);
}
else MessageBox(NULL, "Ready for connections.",
MultiSyncServerName, MB_ICONINFORMATION);
while (LoopGDK())
{
dbClear(0, 0, 0);
dbText(0, 0, MultiSyncServerName);
connection = NetPlayerJoined();
if (connection != 0)
{
NetPutString(MultiSyncServerName);
NetSend(connection);
connections++;
}
playerleft = NetPlayerLeft();
if (playerleft)
{
connections--;
}
//
sprintf(tempstr, "%i connected.", connections);
dbText(0, 32, tempstr);
dbSync();
}
//
return;
}
And Client
// Dark GDK - The Game Creators - www.thegamecreators.com
// Simple Telnet style client for MultiSync.
//
//
//
//
#include <DarkGDK.h>
#include "multisync.h"
char ErrorNoConnection[] = "Could not establish connection to MultiSync Server.";
char ErrorNoConnectMessage[] = "Expected connection message.";
char MultiSyncClientName[] = "MultiSync Basic Client for GDK v0.alpha";
char serverip[] = "127.0.0.1";
char tempstr[256];
bool connected = false;
// Place forward references to functions that will be called in the game loop,
// but will appear after the call in the source file. To make a forward reference,
// simply place the function prototype here.
bool TryMultiSyncServerConnect(char* ipaddress);
void DarkGDK (void)
{
dbSyncOn();
dbSyncRate(60);
dbPositionCamera(10, 10, -20);
NetSetPort(23);
connected = TryMultiSyncServerConnect(serverip);
while (LoopGDK())
{
dbSync();
}
if (NetConnected()) NetDisconnect();
return;
}
bool TryMultiSyncServerConnect(char *ipaddress)
{
DWORD start;
sprintf(tempstr, "BUFFER CONTENT UNCHANGED.");
if (NetConnect(ipaddress))
{
start = GetTickCount();
while (GetTickCount() - start < 1000);
if (NetGetMessage()) NetGetString(tempstr, 256);
else sprintf(tempstr, ErrorNoConnectMessage);
MessageBox(NULL, tempstr,
MultiSyncClientName, MB_ICONINFORMATION);
return true;
}
else
{
MessageBox(NULL, ErrorNoConnection,
MultiSyncClientName, MB_ICONEXCLAMATION);
return false;
}
}
So I ran the host on one, it said "ready to accept connections", then I ran the client on the other and it didn't work "Could not connect to a multisync server.
Then I tried changing the "server ip address" to the server's ip. Still no luck.
Then I made sure the programs were listed as exceptions in the firewall, same thing.
Now I'm kind of stumped... Any help would be appreciated.