This repository has been archived on 2026-04-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Tortuga/server/unit.cpp
T
2013-05-19 21:27:24 +10:00

26 lines
425 B
C++

#include "udp_network_utility.hpp"
#include "SDL_net/SDL_net.h"
#include <iostream>
#include <string>
using namespace std;
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;
}