WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
raw_socket_istream.hpp
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
8
9namespace wpi::net {
10
11class NetworkStream;
12
14 public:
15 explicit raw_socket_istream(NetworkStream& stream, int timeout = 0)
16 : m_stream(stream), m_timeout(timeout) {}
17
18 void close() override;
19 size_t in_avail() const override;
20
21 private:
22 void read_impl(void* data, size_t len) override;
23
24 NetworkStream& m_stream;
25 int m_timeout;
26};
27
28} // namespace wpi::net
Definition NetworkStream.hpp:12
raw_socket_istream(NetworkStream &stream, int timeout=0)
Definition raw_socket_istream.hpp:15
size_t in_avail() const override
Definition raw_istream.hpp:21
Definition raw_socket_ostream.hpp:9