Wrapper completed & tested; adjusted many systems

This commit is contained in:
Kayne Ruse
2013-05-19 21:27:24 +10:00
parent 000e3707ed
commit f8c174741d
9 changed files with 192 additions and 28 deletions
+19 -2
View File
@@ -1,9 +1,26 @@
#include "udp_network_utility.hpp"
#include "SDL_net/SDL_net.h"
#include <iostream>
#include <string>
using namespace std;
//receive any amount of info and print it
int main(int, char**) {
if (SDLNet_Init()) {
cerr << "Failed to init SDL_net" << endl;
return -1;
}
UDPNetworkUtility netUtil;
netUtil.Open(0, 512);
string s = "Hello world";
netUtil.Send("127.0.0.1", 2000, (void*)s.c_str(), s.length());
netUtil.Close();
SDLNet_Quit();
return 0;
}