You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
613 B

3 years ago
/*
* @Description:
* @Version: 1.0
* @Autor: lishengyin
* @Date: 2022-04-11 17:30:58
* @LastEditors: lishengyin
* @LastEditTime: 2022-04-11 17:43:09
*/
#ifndef __TCPSERVER_HPP_
#define __TCPSERVER_HPP_
#include "UserApp.hpp"
#include "TcpServer.hpp"
class TcpServer:private NonCopyable
{
private:
TcpServer(int port):port_(port){}
public:
using Ptr = std::shared_ptr<TcpServer>;
~TcpServer();
/**
* @description:
* @param {int} port
* @return {*}
*/
static std::shared_ptr<TcpServer> CreateNew(int port);
private:
int port_;
};
#endif