Sming Framework API
()
Toggle main menu visibility
Sming
Components
ssl
include
Network
Ssl
InputBuffer.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
* InputBuffer.h
8
*
9
****/
10
11
#pragma once
12
13
#include <cstdlib>
14
#include <cstdint>
15
#include <lwip/pbuf.h>
16
17
namespace
Ssl
18
{
22
class
InputBuffer
23
{
24
public
:
25
InputBuffer
(pbuf* buf) : buf(buf)
26
{
27
}
28
29
size_t
available
()
const
30
{
31
return
buf ? (buf->tot_len - offset) : 0;
32
}
33
34
size_t
read
(
uint8_t
* buffer,
size_t
bufSize);
35
36
private
:
37
pbuf* buf;
38
uint16_t
offset = 0;
39
};
40
41
}
// namespace Ssl
Ssl::InputBuffer::InputBuffer
InputBuffer(pbuf *buf)
Definition:
InputBuffer.h:41
uint8_t
Ssl::InputBuffer::available
size_t available() const
Definition:
InputBuffer.h:45
uint16_t
Ssl::InputBuffer::read
size_t read(uint8_t *buffer, size_t bufSize)
Ssl
Definition:
Alert.h:15
Generated by
1.8.17