Asynchronously sends data to an UDP socket.
更多...
#include <UdpSocketSender.h>
Asynchronously sends data to an UDP socket.
- 待办事项:
- networking: gmp: implement rate limits
◆ FUdpSocketSender()
| FUdpSocketSender::FUdpSocketSender |
( |
FSocket * |
InSocket, |
|
|
const TCHAR * |
ThreadDescription |
|
) |
| |
|
inline |
Creates and initializes a new socket sender.
- 参数
-
| InSocket | The UDP socket to use for sending data. |
| ThreadDescription | The thread description text (for debugging). |
◆ Exit()
| virtual void FUdpSocketSender::Exit |
( |
| ) |
|
|
inlineoverridevirtual |
Exits the runnable object.
Called in the context of the aggregating thread to perform any cleanup.
- 参见
- Init, Run, Stop
重载 FRunnable .
◆ GetSendRate()
| uint32 FUdpSocketSender::GetSendRate |
( |
| ) |
const |
|
inline |
Gets the maximum send rate (in bytes per second).
- 返回
- Current send rate.
◆ GetSingleThreadInterface()
Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled.
If the interface is not implemented, this runnable will not be ticked when FPlatformProcess::SupportsMultithreading() is false.
- 返回
- Pointer to the single thread interface or nullptr if not implemented.
重载 FRunnable .
◆ GetThroughput()
| uint32 FUdpSocketSender::GetThroughput |
( |
| ) |
const |
|
inline |
Gets the current throughput (in bytes per second).
- 返回
- Current throughput.
◆ Init()
| virtual bool FUdpSocketSender::Init |
( |
| ) |
|
|
inlineoverridevirtual |
Initializes the runnable object.
This method is called in the context of the thread object that aggregates this, not the thread that passes this runnable to a new thread.
- 返回
- True if initialization was successful, false otherwise
- 参见
- Run, Stop, Exit
重载 FRunnable .
◆ Run()
| virtual uint32 FUdpSocketSender::Run |
( |
| ) |
|
|
inlineoverridevirtual |
Runs the runnable object.
This is where all per object thread work is done. This is only called if the initialization was successful.
- 返回
- The exit code of the runnable object
- 参见
- Init, Stop, Exit
实现了 FRunnable.
◆ Send()
Sends data to the specified recipient.
- 参数
-
| Data | The data to send. |
| Recipient | The recipient. |
- 返回
- true if the data will be sent, false otherwise.
◆ SetSendRate()
| void FUdpSocketSender::SetSendRate |
( |
uint32 |
Rate | ) |
|
|
inline |
Sets the send rate (in bytes per second).
- 参数
-
| Rate | The new send rate (0 = unlimited). |
- 参见
- SetWaitTime
◆ SetWaitTime()
| void FUdpSocketSender::SetWaitTime |
( |
const FTimespan & |
Timespan | ) |
|
|
inline |
Sets the maximum time span to wait for work items.
- 参数
-
- 参见
- SetSendRate
◆ Stop()
| virtual void FUdpSocketSender::Stop |
( |
| ) |
|
|
inlineoverridevirtual |
Stops the runnable object.
This is called if a thread is requested to terminate early.
- 参见
- Init, Run, Exit
重载 FRunnable .
◆ Update()
| bool FUdpSocketSender::Update |
( |
const FTimespan & |
SocketWaitTime | ) |
|
|
inlineprotected |
Update this socket sender.
- 参数
-
| Time | to wait for the socket. |
- 返回
- true on success, false otherwise.
该类的文档由以下文件生成: