HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
stream.hpp
1// Copyright Take Vos 2020.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5
6#pragma once
7
8namespace tt {
9
11
12protected:
13 bool connecting = false;
14
17 packet_buffer readBuffer;
18
21 packet_buffer writeBuffer;
22
23public:
24
28
31 virtual bool needToRead();
32
35 virtual bool needToWrite();
36
40 [[nodiscard]] virtual void handleReadyToReadEvent();
41
45 [[nodiscard]] virtual void handleReadyToWriteEvent();
46
47
48}
49
50
51
52}
53
Definition packet_buffer.hpp:10
Definition stream.hpp:10
virtual bool needToRead()
Check if the socket-stream needs to read.
virtual bool needToWrite()
Check if the socket-stream needs to read.
virtual void handleReadyToWriteEvent()
Handle ready-to-write event.
virtual void handleReadyToReadEvent()
Handle ready-to-read event.
void handleConnect()
Handle connected event.