24 lines
516 B
C++
24 lines
516 B
C++
|
|
|
|
#include <expected>
|
|
#include <string>
|
|
#include <cstring>
|
|
#include <iostream>
|
|
|
|
#include <service.hpp>
|
|
|
|
int main(int argc, char** argv) {
|
|
Service svc(1025);
|
|
auto bindres = svc.Bind();
|
|
if (!bindres) {
|
|
std::cerr << bindres.error() << std::endl;
|
|
return 1;
|
|
}
|
|
SocketHandler handler;
|
|
auto listres = svc.Listen(&handler);
|
|
if (!listres) {
|
|
std::cerr << listres.error() << std::endl;
|
|
return 1;
|
|
}
|
|
}
|