rcpp_framework/libs/brynet/net/Channel.hpp

21 lines
306 B
C++
Raw Normal View History

2020-11-24 15:41:18 +01:00
#pragma once
namespace brynet { namespace net {
2021-04-30 16:10:14 +02:00
class EventLoop;
2020-11-24 15:41:18 +01:00
2021-04-30 16:10:14 +02:00
class Channel
{
public:
virtual ~Channel() = default;
2020-11-24 15:41:18 +01:00
2021-04-30 16:10:14 +02:00
private:
virtual void canSend() = 0;
virtual void canRecv(bool willClose) = 0;
virtual void onClose() = 0;
2020-11-24 15:41:18 +01:00
2021-04-30 16:10:14 +02:00
friend class EventLoop;
};
2020-11-24 15:41:18 +01:00
2021-04-30 16:10:14 +02:00
}}// namespace brynet::net