From b88cd9fe7c944cd11d776392fcb1c25d7d7acddf Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Thu, 30 Jan 2025 22:49:06 +0100 Subject: [PATCH] port num --- app/src/DnaStore.cpp | 2 +- server/src/server.cpp | 2 +- shared/inc/NetConst.hpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/DnaStore.cpp b/app/src/DnaStore.cpp index df065fc..fdc8152 100644 --- a/app/src/DnaStore.cpp +++ b/app/src/DnaStore.cpp @@ -167,7 +167,7 @@ void client(std::string prefix) std::string buffer; buffer.resize(prefix.size() + extra_buff); - int sock = TcpSocket::connectt("petrovv.com", 8888); + int sock = TcpSocket::connectt("petrovv.com", serverPort); if (sock < 0) { diff --git a/server/src/server.cpp b/server/src/server.cpp index 0ea2825..f332fc9 100644 --- a/server/src/server.cpp +++ b/server/src/server.cpp @@ -120,7 +120,7 @@ int main() sql::init(); std::thread t(checker); // Bind the server to a port. - int err = TcpSocket::listent("0.0.0.0", 8888, call); + int err = TcpSocket::listent("0.0.0.0", serverPort, call); if (err < 0) { printf("ERROR %d", err); diff --git a/shared/inc/NetConst.hpp b/shared/inc/NetConst.hpp index bd43a23..60a7b5c 100644 --- a/shared/inc/NetConst.hpp +++ b/shared/inc/NetConst.hpp @@ -1,6 +1,7 @@ #include constexpr int64_t StartHeader = 1737720524UL; +constexpr uint16_t serverPort = 9000; enum Mess {