mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-09-01 14:49:25 +00:00
Added available and availableSize getters on DataChannel
This commit is contained in:
@ -46,6 +46,9 @@ public:
|
||||
void send(const byte *data, size_t size);
|
||||
std::optional<std::variant<binary, string>> receive();
|
||||
|
||||
size_t available() const;
|
||||
size_t availableSize() const;
|
||||
|
||||
unsigned int stream() const;
|
||||
string label() const;
|
||||
string protocol() const;
|
||||
@ -69,6 +72,7 @@ private:
|
||||
std::atomic<bool> mIsClosed = false;
|
||||
|
||||
Queue<message_ptr> mRecvQueue;
|
||||
std::atomic<size_t> mRecvSize = 0;
|
||||
|
||||
friend class PeerConnection;
|
||||
};
|
||||
|
Reference in New Issue
Block a user