mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
LibTLS: Remove unused methods
Affected methods are: - can_read_line - can_read - read_line
This commit is contained in:
parent
b46667639f
commit
9581fe1d7d
2 changed files with 0 additions and 25 deletions
|
@ -32,27 +32,6 @@ ErrorOr<Bytes> TLSv12::read_some(Bytes bytes)
|
|||
return Bytes { bytes.data(), size_to_read };
|
||||
}
|
||||
|
||||
DeprecatedString TLSv12::read_line(size_t max_size)
|
||||
{
|
||||
if (!can_read_line())
|
||||
return {};
|
||||
|
||||
auto* start = m_context.application_buffer.data();
|
||||
auto* newline = (u8*)memchr(m_context.application_buffer.data(), '\n', m_context.application_buffer.size());
|
||||
VERIFY(newline);
|
||||
|
||||
size_t offset = newline - start;
|
||||
|
||||
if (offset > max_size)
|
||||
return {};
|
||||
|
||||
DeprecatedString line { bit_cast<char const*>(start), offset, Chomp };
|
||||
// FIXME: Propagate errors.
|
||||
m_context.application_buffer = MUST(m_context.application_buffer.slice(offset + 1, m_context.application_buffer.size() - offset - 1));
|
||||
|
||||
return line;
|
||||
}
|
||||
|
||||
ErrorOr<size_t> TLSv12::write_some(ReadonlyBytes bytes)
|
||||
{
|
||||
if (m_context.connection_status != ConnectionStatus::Established) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue