Basic connection between server and unit

This commit is contained in:
Kayne Ruse
2013-05-10 19:57:53 +10:00
parent a667fae21a
commit 4671afe900
18 changed files with 891 additions and 42 deletions
+22
View File
@@ -0,0 +1,22 @@
#include "network.hpp"
#include <iostream>
using namespace std;
//receive any amount of info and print it
int main(int, char**) {
NetworkInit();
TCPSocket sock("127.0.0.1",2000);
char buffer[512];
while(true) {
memset(buffer, 0, 512);
if (sock.Recv(buffer, 512)) {
cout << buffer << endl;
}
}
NetworkQuit();
return 0;
}