BaseTransport.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * BaseTransport.h
8  *
9  * @author 2021 Slavey Karadzhov <slav@attachix.com>
10  *
11  *
12  ****/
13 
14 #pragma once
15 
16 #include <Stream.h>
17 #include <Delegate.h>
18 
20 {
22 {
23 public:
24  using DataHandler = Delegate<bool(Stream&)>;
25 
26  virtual ~BaseTransport()
27  {
28  }
29 
31  {
32  this->handler = handler;
33  }
34 
35 protected:
37 };
38 
39 } // namespace Hosted::Transport
Definition: BaseTransport.h:22
void onData(DataHandler handler)
Definition: BaseTransport.h:30
virtual ~BaseTransport()
Definition: BaseTransport.h:26
DataHandler handler
Definition: BaseTransport.h:36
Base Stream class.
Definition: Wiring/Stream.h:33
Definition: BaseTransport.h:20