,
I’m having a Engine Crash issue with the function CreateTCPConnectionListener.
FSocket* ATestActor::CreateTCPConnectionListener(const FString& YourChosenSocketName, const FString& TheIP, const int32 ThePort, const int32 ReceiveBufferSize)
{
uint8 IP4Nums[4];
if (!FormatIP4ToNumber(TheIP, IP4Nums))
{
return false;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//Create Socket
FIPv4Endpoint Endpoint(FIPv4Address(IP4Nums[0], IP4Nums[1], IP4Nums[2], IP4Nums[3]), ThePort);
FSocket* ListenSocket = FTcpSocketBuilder(*YourChosenSocketName).AsReusable().BoundToEndpoint(Endpoint).Listening(8);
//Set Buffer Size
int32 NewSize = 0;
/*---------------> WHERE IT POINTS WHEN CRASHES*/ ListenSocket->SetReceiveBufferSize(ReceiveBufferSize, NewSize);
//Done!
return ListenSocket;
}
I’m using a .jar file to send information to the local host(127.0.0.1:7000). I’m using 4.9… Any help on what’s happening would be excellent :(.
EDIT:
Got the output from the crash… looks like it failed to create the socket
[2015.09.15-04.10.42:416][150]LogWorld: Game class is 'derpGameMode'
[2015.09.15-04.10.42:425][150]LogWorld: Bringing World /Game/ThirdPersonCPP/Maps/UEDPIE_0_ThirdPersonExampleMap.ThirdPersonExampleMap up for play (max tick rate 0) at 2015.09.14-23.10.42
[2015.09.15-04.10.42:426][150]LogActor:Warning: GameSession /Game/ThirdPersonCPP/Maps/UEDPIE_0_ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.GameSession_0 has natively added scene component(s), but none of them were set as the actor's RootComponent - picking one arbitrarily
[2015.09.15-04.10.42:426][150]LogActor:Warning: GameNetworkManager /Game/ThirdPersonCPP/Maps/UEDPIE_0_ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.GameNetworkManager_0 has natively added scene component(s), but none of them were set as the actor's RootComponent - picking one arbitrarily
[2015.09.15-04.10.42:427][150]LogWorld: Bringing up level for play took: 0.009418
[2015.09.15-04.10.42:429][150]FTcpSocketBuilder: Failed to create the socket RamaSocketListener as configured
Blaah Dx… Any help would be great :(.