Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 497 Bytes
#include "Socket.h"
#include "ProtocolSimple.h"
#include <iostream>
namespace Sock = ThorsAnvil::Socket;
int main()
{
Sock::ServerSocket server(8080);
int finished = 0;
while(!finished)
{
Sock::DataSocket accept = server.accept();
Sock::ProtocolSimple acceptSimple(accept);
std::string message;
acceptSimple.recvMessage(message);
std::cout << message << "\n";
acceptSimple.sendMessage("", "OK");
}
}