Sming Framework API
(1.2.0-1086-g8d325e51)
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 <user_config.h>
14
15
namespace
Ssl
16
{
20
class
InputBuffer
21
{
22
public
:
23
InputBuffer
(pbuf* buf) : buf(buf)
24
{
25
}
26
27
size_t
available
()
const
28
{
29
return
buf ? (buf->tot_len - offset) : 0;
30
}
31
32
size_t
read
(uint8_t* buffer,
size_t
bufSize);
33
34
private
:
35
pbuf* buf;
36
uint16_t
offset = 0;
37
};
38
39
}
// namespace Ssl
Ssl::InputBuffer::read
size_t read(uint8_t *buffer, size_t bufSize)
Ssl::InputBuffer
Wraps a pbuf for reading in chunks.
Definition:
InputBuffer.h:20
Ssl
Definition:
Alert.h:15
Ssl::InputBuffer::InputBuffer
InputBuffer(pbuf *buf)
Definition:
InputBuffer.h:23
Ssl::InputBuffer::available
size_t available() const
Definition:
InputBuffer.h:27
uint16_t
Generated by
1.8.13