33 ::ll::TypedStorage<8, 32, ::std::string> data;
34 ::ll::TypedStorage<4, 4, ::Compressibility> compressible;
35 ::ll::TypedStorage<8, 64, ::std::function<void()>> callback;
42 ::ll::TypedStorage<8, 80, ::BinaryStream> mOutgoingData;
43 ::ll::TypedStorage<8, 8, uint64> mCompressibleBytes;
44 ::ll::TypedStorage<8, 32, ::std::string> mIncomingDataBuffer;
45 ::ll::TypedStorage<8, 80, ::std::optional<::ReadOnlyBinaryStream>> mIncomingData;
46 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
47 ::ll::TypedStorage<8, 80, ::SPSCQueue<::BatchedNetworkPeer::DataCallback, 512>> mSendQueue;
48 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mTaskRunning;
49 ::ll::TypedStorage<8, 8, ::std::atomic<uint64>> mQueuedPackets;
50 ::ll::TypedStorage<8, 8, uint64> mSentPackets;
51 ::ll::TypedStorage<1, 1, bool> mAsyncEnabled;
61 virtual ~BatchedNetworkPeer() =
default;
63 virtual void flush(::std::function<
void()>&& callback) ;
65 virtual void sendPacket(
66 ::std::string
const& data,
67 ::NetworkPeer::Reliability reliability,
68 ::Compressibility compressible
71 virtual ::NetworkPeer::NetworkStatus getNetworkStatus() const ;
73 virtual
void update() ;
76 ::
std::
string& outData,
77 ::
std::shared_ptr<::
std::chrono::steady_clock::time_point> const& timepointPtr
96 MCAPI
void $flush(::
std::function<
void()>&& callback);
99 $sendPacket(::
std::
string const& data, ::
NetworkPeer::Reliability reliability, ::Compressibility compressible);
103 MCAPI
void $update();
106 ::
std::
string& outData,
107 ::
std::shared_ptr<::
std::chrono::steady_clock::time_point> const& timepointPtr