Error C:\Users\Chilly\Documents\Unreal Projects\Project_Zarus_MMO\Source\Project_Zarus_MMO\UDPSender.cpp(28) : note: see reference to function template instantiation ‘TFunction::TFunction(FunctorType &&)’ being compiled
Info with
Info [
Info FunctorType=void (__cdecl AUDPSender::* )(void)
Info ]
The above info is what is confusing me. To myself this is not saying much of anything other than “yep… we’re compiling that function now”
I am trying to rebuild an old UDPSender and Receiver, however I cannot wrap my head around this error.
It occurs here:
bool AUDPSender::StartTCPReceiver(
const FString& YourChosenSocketName,
const FString& TheIP,
const int32 ThePort
) {
ListenerSocket = CreateTCPConnectionListener(YourChosenSocketName, TheIP, ThePort);
if (!ListenerSocket)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("StartTCPReceiver>> Listen socket could not be created! ~> %s %d"), *TheIP, ThePort));
return false;
}
FTimerHandle TCPReceiver;
GetWorldTimerManager().SetTimer(TCPReceiver, &AUDPSender::TCPConnectionListener, 1.0f, false);
return true;
}
This here is the function that it calls &AUDPSender::TCPConnectionListener
void AUDPSender::TCPConnectionListener()
{
if (!ListenerSocket) return;
// Remote Address
TSharedRef<FInternetAddr> RemoteAddress = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateInternetAddr();
bool Pending;
// Handle Incomming Connections
if (ListenerSocket->HasPendingConnection(Pending) && Pending)
{
if (ConnectionSocket)
{
ConnectionSocket->Close();
ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->DestroySocket(ConnectionSocket);
}
//New Connection Received!
ConnectionSocket = ListenerSocket->Accept(*RemoteAddress, TEXT("TCP Received Socket Connection"));
if (ConnectionSocket != NULL)
{
RemoteAddressForConnection = FIPv4Endpoint(RemoteAddress);
FTimerHandle TCPListener;
GetWorldTimerManager().SetTimer(TCPListener, &AUDPSender::TCPSocketListener, 0.01, true);
}
}
}
Anywho, thank you for any help that can be provided, a pastebin with all of the error log is linked below.