update socket server

This commit is contained in:
ackimixs
2024-03-28 13:01:46 +01:00
parent 6068f8928d
commit 6d6570837b
4 changed files with 63 additions and 3 deletions

View File

@@ -1,8 +1,13 @@
#include "TCPServer.h"
int main() {
int main(int argc, char* argv[]) {
TCPServer server(8080);
int port = 8080;
if (argc >= 2) {
port = std::stoi(argv[1]);
}
TCPServer server(port);
try {
server.start();