Skip to content
Permalink
master
Go to file
Latest commit 7ab15f0 Jun 4, 2016 History
    Don't need different versions of a file in different directories
    Use them from the folder were they are introduced then add
    functionality as required
1 contributor

Users who have contributed to this file

23 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");
}
}
You can’t perform that action at this time.