33 ::ll::TypedStorage<8, 32, ::std::string> data;
34 ::ll::TypedStorage<4, 4, ::Compressibility> compressible;
35 ::ll::TypedStorage<8, 64, ::std::function<void()>> callback;
40 DataCallback& operator=(DataCallback
const&);
41 DataCallback(DataCallback
const&);
49 MCAPI ~DataCallback();
62 ::ll::TypedStorage<8, 80, ::BinaryStream> mOutgoingData;
63 ::ll::TypedStorage<8, 8, uint64> mCompressibleBytes;
64 ::ll::TypedStorage<8, 32, ::std::string> mIncomingDataBuffer;
65 ::ll::TypedStorage<8, 80, ::std::optional<::ReadOnlyBinaryStream>> mIncomingData;
66 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
67 ::ll::TypedStorage<8, 80, ::SPSCQueue<::BatchedNetworkPeer::DataCallback, 512>> mSendQueue;
68 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mTaskRunning;
69 ::ll::TypedStorage<8, 8, ::std::atomic<uint64>> mQueuedPackets;
70 ::ll::TypedStorage<8, 8, uint64> mSentPackets;
71 ::ll::TypedStorage<1, 1, bool> mAsyncEnabled;
81 virtual ~BatchedNetworkPeer() ;
83 virtual void flush(::std::function<
void()>&& callback) ;
86 sendPacket(::std::string
const& data, ::NetworkPeer::Reliability compressible, ::Compressibility) ;
88 virtual ::NetworkPeer::NetworkStatus getNetworkStatus() const ;
90 virtual
void update() ;
93 ::
std::
string& outData,
94 ::
std::shared_ptr<::
std::chrono::steady_clock::time_point> const& timepointPtr
103 MCAPI
void _startSendTask();
105 MCAPI
void setAsyncEnabled(
bool val);
123 MCAPI
void $flush(::
std::function<
void()>&& callback);
125 MCAPI
void $sendPacket(::
std::
string const& data, ::
NetworkPeer::Reliability compressible, ::Compressibility);
129 MCAPI
void $update();
132 ::
std::
string& outData,
133 ::
std::shared_ptr<::
std::chrono::steady_clock::time_point> const& timepointPtr