sockscape/server/src/main.cpp

36 lines
823 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-03-07 23:07:28 +00:00
#include "sock/tcpsock.hpp"
2018-03-15 04:01:24 +00:00
#include "crypto/sha1.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
});*/
2018-03-08 04:27:54 +00:00
/*sosc::TcpClient client;
client.Open("127.0.0.1", 1111);
2018-03-01 23:16:47 +00:00
2018-03-07 23:07:28 +00:00
client.Send("test");
2018-03-08 04:27:54 +00:00
std::string got = "abc";
2018-03-07 23:07:28 +00:00
while(client.IsOpen()) {
2018-03-08 04:27:54 +00:00
int length = client.Receive(&got);
2018-03-07 23:07:28 +00:00
if(length > 0)
std::cout << got << std::endl;
2018-03-08 04:27:54 +00:00
}*/
2018-02-15 23:09:09 +00:00
2018-03-15 04:01:24 +00:00
std::string a = sosc::cgc::sha1("test");
2018-03-13 22:33:54 +00:00
2018-02-14 01:16:58 +00:00
return 0;
}