26 lines
535 B
C++
26 lines
535 B
C++
|
|
#include <expected>
|
|
#include <string>
|
|
#include <cstring>
|
|
|
|
#include <tservice.hpp>
|
|
#include <uxlogger.hpp>
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
TCPService service(1025);
|
|
auto bindRes = service.Bind();
|
|
if (!bindRes) {
|
|
uxlogger.Log("Bind error: " + bindRes.error());
|
|
return 1;
|
|
}
|
|
auto listenRes = service.Listen();
|
|
if (!listenRes) {
|
|
uxlogger.Log("Listen error: " + listenRes.error());
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|