sockscape/server/src/main.cpp

28 lines
665 B
C++
Raw Normal View History

2018-02-14 01:16:58 +00:00
#include <iostream>
2018-02-28 23:07:39 +00:00
#include <string>
2018-02-15 23:09:09 +00:00
#include "sock/tcpsock.hpp"
2018-02-28 23:07:39 +00:00
#include "utils/string.hpp"
2018-03-01 23:16:47 +00:00
#include "utils/net.hpp"
2018-03-05 23:23:07 +00:00
#include "utils/time.hpp"
2018-02-14 01:16:58 +00:00
int main(int argc, char **argv) {
2018-02-16 22:34:22 +00:00
//auto sock = sosc::TcpClient();
2018-03-01 23:16:47 +00:00
/*std::string a = "this!!is!!a!!test";
2018-02-28 23:07:39 +00:00
auto b = sosc::str::split(a, "!!");
std::for_each(b.begin(), b.end(), [](std::string& i) {
std::cout << i << std::endl;
2018-03-01 23:16:47 +00:00
});*/
uint32_t test = 0xDEADBEEF;
std::string net = HTONUL(test);
test = NTOHUL(net);
2018-03-06 22:54:31 +00:00
sosc::net::IpAddress ip1, ip2;
ip1.Parse("::*:FE:EF:F**F");
ip2.Parse("::ABCD:F*:*:F00F");
bool same = ip1 == ip2;
2018-02-15 23:09:09 +00:00
2018-02-14 01:16:58 +00:00
return 0;
}