MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / DataStream

Class DataStream

Kernel/include/stream.h:34–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32};
33
34class DataStream final : public Stream {
35 lock_t streamLock = 0;
36
37 size_t bufferSize = 0;
38 size_t bufferPos = 0;
39
40 uint8_t* buffer = nullptr;
41public:
42 DataStream(size_t bufSize);
43 ~DataStream();
44
45 void Wait();
46
47 int64_t Read(void* buffer, size_t len);
48 int64_t Peek(void* buffer, size_t len);
49 int64_t Write(void* buffer, size_t len);
50
51 int64_t Pos() { return bufferPos; }
52 virtual int64_t Empty();
53};
54
55class PacketStream final : public Stream {
56 List<stream_packet_t> packets;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected