#include "socketio.hpp" #include #include template std::ostream& operator<<(std::ostream& out, std::vector o){ out << "("; for(unsigned int i = 0;i < o.size();i++){ if(o[i] == '\r')continue; out << o[i]; if(i < (o.size() - 1)) out << ", "; } return out << ")"; } template<> std::ostream& operator<< (std::ostream& out, std::vector o){ for(unsigned int i = 0;i < o.size();i++){ out << o[i]; } return out; } int main(){ server_socket ssock(80); while(true){ cppsocket sock = ssock.accept_connection(); try{ std::vector vec = sock.receive(); sock.write("Hallo\n"); sock.close(); } catch(std::exception& e){ std::cout << e.what() << std::endl; } } }