17 #include <pia/transport/transport_definitions.h> 41 class TransportThreadStreamOld;
43 class SendThreadStream;
44 class ReceiveThreadStream;
74 static const s32 SEND_THREAD_DEFAULT_PRIORITY = 10;
75 static const s32 RECEIVE_THREAD_DEFAULT_PRIORITY = 10;
76 #elif NN_PIA_WIN || NN_PIA_NIN_WIN 77 static const s32 SEND_THREAD_DEFAULT_PRIORITY = THREAD_PRIORITY_ABOVE_NORMAL;
78 static const s32 RECEIVE_THREAD_DEFAULT_PRIORITY = THREAD_PRIORITY_ABOVE_NORMAL;
80 static const s32 SEND_THREAD_DEFAULT_PRIORITY = 10;
81 static const s32 RECEIVE_THREAD_DEFAULT_PRIORITY = 10;
83 #error "Invalid platform" 86 static const s32 SEND_THREAD_DEFAULT_SLEEP_SPAN = 5;
87 static const s32 RECEIVE_THREAD_DEFAULT_SLEEP_SPAN = 5;
110 size_t sendThreadMaxPacketNum,
111 size_t receiveThreadMaxPacketNum,
112 size_t sendThreadLatencyEmulationPacketNum,
113 size_t receiveThreadLatencyEmulationPacketNum,
114 bool bPacketLossEmulation);
125 static void DestroyInstance(
void);
151 nn::Result Startup(
void);
184 void SetSendThreadPriority(s32 prio);
195 s32 GetSendThreadPriority(
void)
const;
207 void SetReceiveThreadPriority(s32 prio);
218 s32 GetReceiveThreadPriority(
void)
const;
229 void SetSendThreadSleepTimeSpan(u32 span);
240 u32 GetSendThreadSleepTimeSpan(
void)
const;
251 void SetReceiveThreadSleepTimeSpan(u32 span);
262 u32 GetReceiveThreadSleepTimeSpan(
void)
const;
283 nn::Result SetSendThreadLatencyEmulation(s32 minLatency, s32 maxLatency);
304 nn::Result SetReceiveThreadLatencyEmulation(s32 minLatency, s32 maxLatency);
316 size_t GetSendThreadSendPacketNum(
void)
const;
327 void ClearSendThreadSendPacketNum(
void);
339 size_t GetReceiveThreadReceivePacketNum(
void)
const;
350 void ClearReceiveThreadReceivePacketNum(
void);
362 u64 GetSendThreadSendDataSize(
void)
const;
373 void ClearSendThreadSendDataSize(
void);
385 u64 GetReceiveThreadReceiveDataSize(
void)
const;
396 void ClearReceiveThreadReceiveDataSize(
void);
415 nn::Result SetSendThreadPacketLossRatio(s32 lossPercentage);
424 s32 GetSendThreadPacketLossRatio(
void)
const;
442 nn::Result SetReceiveThreadPacketLossRatio(s32 lossPercentage);
451 s32 GetReceiveThreadPacketLossRatio(
void)
const;
458 ReceiveThreadStream* GetReceiveStream(
void)
460 return m_pReceiveStream;
469 const ReceiveThreadStream* GetReceiveStream(
void)
const 471 return m_pReceiveStream;
480 SendThreadStream* GetSendStream(
void)
482 return m_pSendStream;
491 const SendThreadStream* GetSendStream(
void)
const 493 return m_pSendStream;
502 common::IPacketInput* GetInputStream(
void)
504 return m_pInputStream;
512 common::IPacketOutput* GetOutputStream(
void)
514 return m_pOutputStream;
523 void SetMonitoringData(
void);
532 virtual void Trace(u64 flag)
const;
535 #if NN_PIA_ENABLE_STATISTIC_THREAD_STREAM_BLOCK_TIME 536 void ResetThreadStreamStatistic();
537 void PrintThreadStreamStatistic(u32 printMaxDataNum);
550 size_t sendThreadMaxPacketNum,
551 size_t receiveThreadMaxPacketNum,
552 size_t sendThreadLatencyEmulationPacketNum,
553 size_t receiveThreadLatencyEmulationPacketNum,
554 bool bPacketLossEmulation);
568 common::IPacketInput* m_pInputStream;
569 common::IPacketOutput* m_pOutputStream;
571 ReceiveThreadStream* m_pReceiveStream;
572 SendThreadStream* m_pSendStream;
static ThreadStreamManager * GetInstance(void)
Gets the ThreadStreamManager class instance (singleton pattern).
Definition: transport_ThreadStreamManager.h:136
Provides a unified interface for managing sending and receiving threads.
Definition: transport_ThreadStreamManager.h:70
An interface (factory pattern) for generating the classes needed by the network.
Definition: transport_NetworkFactory.h:89
This is the common base class used inside the Pia library.
Definition: common_RootObject.h:40