Navigation
API > API/Plugins > API/Plugins/OnlineSubsystemUtils > API/Plugins/OnlineSubsystemUtils/UIpNetDriver
Description
Creates a new Socket for the NetDriver/NetConnection's, based on the address/binding of the existing socket, with a new ephemeral port. Used to attempt recovery for 'half-broken' connections, where (for whatever reason) only one side of the connection is receiving packets.
Also usable to test the 'restart handshake' feature, using the 'net RecreateSocket' command.
| Name | RecreateSocket |
| Type | function |
| Header File | /Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Classes/IpNetDriver.h |
| Include Path | #include "IpNetDriver.h" |
| Source | /Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/IpNetDriver.cpp |
UE::Net::ERecreateSocketResult RecreateSocket
(
int32 OverridePort
)
Returns the action taken (e.g. successfully kicked off recreation, or whether this failed or is already in progress etc.)
Parameters
| Name | Remarks |
|---|---|
| OverridePort | optional port number to use with the new socket, otherwise falls back to GetClientPort() |