HiveMind
TCPClientWrapper.h
Go to the documentation of this file.
1 #ifndef __TCPClientWrapperWRAPPER_H_
2 #define __TCPClientWrapperWRAPPER_H_
3 
4 #include "bsp/ITCPClient.h"
5 #include <logger/ILogger.h>
6 
10 class TCPClientWrapper : public ITCPClient {
11  public:
12  TCPClientWrapper(ITCPClient& client) : m_client(client){};
13 
15 
16  bool receive(uint8_t* data, uint16_t length) override { return m_client.receive(data, length); }
17 
18  bool send(const uint8_t* data, uint16_t length) override { return m_client.send(data, length); }
19 
20  bool isConnected() const override { return m_client.isConnected(); }
21 
22  bool close() override { return m_client.close(); }
23 
24  private:
26 };
27 
28 #endif // __TCPClientWrapperWRAPPER_H_
TCPClientWrapper::m_client
ITCPClient & m_client
Definition: TCPClientWrapper.h:25
TCPClientWrapper::receive
bool receive(uint8_t *data, uint16_t length) override
Definition: TCPClientWrapper.h:16
TCPClientWrapper
A TCP client wrapper that is as a common socket between platforms.
Definition: TCPClientWrapper.h:10
TCPClientWrapper::~TCPClientWrapper
~TCPClientWrapper() override
Definition: TCPClientWrapper.h:14
TCPClientWrapper::send
bool send(const uint8_t *data, uint16_t length) override
Definition: TCPClientWrapper.h:18
TCPClientWrapper::TCPClientWrapper
TCPClientWrapper(ITCPClient &client)
Definition: TCPClientWrapper.h:12
TCPClientWrapper::close
bool close() override
Definition: TCPClientWrapper.h:22
TCPClientWrapper::isConnected
bool isConnected() const override
Definition: TCPClientWrapper.h:20
ITCPClient
ILogger.h