Ai
1 Star 0 Fork 0

lsnmjp/code of cpp Linux 算法

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
UDP_Server.cc 665 Bytes
Copy Edit Raw Blame History
lsnmjp authored 2025-06-19 18:25 +08:00 . final UDP demo code
#include "UDP_Server.hpp"
int main(int argc, char *argv[])
{
ENABLE_CONSOLE_LOG;
if (argc != 2 && argc != 1)
{
LOG(LogLevel::ERROR) << "Usage " << argv[0] << ": 127.0.0.1 8080";
Die(1);
}
if (argc == 2)
{
//std::string server_ip = argv[1];
uint16_t server_port = std::stoi(argv[1]);
std::unique_ptr<UdpServer> server_ptr = std::make_unique<UdpServer>(server_port);
server_ptr->InitServer();
server_ptr->Start();
}
else
{
std::unique_ptr<UdpServer> server_ptr = std::make_unique<UdpServer>();
server_ptr->InitServer();
server_ptr->Start();
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/lsnmjp/code-of-cpp-linux-algorithm.git
git@gitee.com:lsnmjp/code-of-cpp-linux-algorithm.git
lsnmjp
code-of-cpp-linux-algorithm
code of cpp Linux 算法
master

Search