rcpp_framework/libs/brynet/net/Channel.hpp

16 lines
227 B
C++
Raw Normal View History

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