From c435b7c69adde29837300e63befa63d7cfdfef86 Mon Sep 17 00:00:00 2001 From: yhy Date: Wed, 25 Dec 2024 19:39:38 +0800 Subject: [PATCH] =?UTF-8?q?connnection=20=E5=88=9D=E6=AD=A5=E5=B0=81?= =?UTF-8?q?=E8=A3=85=EF=BC=8C=20=E6=9C=AA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/net/tcp/tcp_connection.hpp | 20 ++++++++++++++++++++ src/net/tcp/tcp_connection.cc | 0 2 files changed, 20 insertions(+) create mode 100644 includes/net/tcp/tcp_connection.hpp create mode 100644 src/net/tcp/tcp_connection.cc diff --git a/includes/net/tcp/tcp_connection.hpp b/includes/net/tcp/tcp_connection.hpp new file mode 100644 index 0000000..9575aa3 --- /dev/null +++ b/includes/net/tcp/tcp_connection.hpp @@ -0,0 +1,20 @@ +#pragma once + + + +#include "fd_event.hpp" +namespace tinyrpc { + + class TcpConnection { + + public: + + TcpConnection(int fd) : m_fdEvent(fd){}; + + ~TcpConnection(); + private: + FdEvent m_fdEvent; + // TODO .... 完善 TcpConnection 类 + }; + +} \ No newline at end of file diff --git a/src/net/tcp/tcp_connection.cc b/src/net/tcp/tcp_connection.cc new file mode 100644 index 0000000..e69de29