Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Sockets/Public/SocketSubsystem.h |
Include |
#include "SocketSubsystem.h" |
Source |
/Engine/Source/Runtime/Sockets/Private/SocketSubsystem.cpp |
int32 BindNextPort
(
FSocket * Socket,
FInternetAddr & Addr,
int32 PortCount,
int32 PortIncrement
)
Bind to next available port.
The bound port number, or 0 on failure
Parameter |
Description |
---|---|
Socket |
The socket that that will bind to the port |
Addr |
The local address and port that is being bound to (usually the result of GetLocalBindAddr()). This addresses port number will be modified in place |
PortCount |
How many ports to try |
PortIncrement |
The amount to increase the port number by on each attempt |