When I implement the XMPP client in my C++ project. It will start login. But for a long time there will be no response. Log stopped in STATE_OPENING. Where can I check?
Log is as follows.
LogXmpp: Starting Login on connection
LogXmpp: server = 127.0.0.1:5222
LogXmpp: user = /ue_xmpp_test-CCADC2B043707FDAB935578F40D98883
LogXmpp: Startup connection
LogXmpp: Login Changed from NotStarted to ProcessingLogin
LogXmpp:Verbose: STATE_OPENING
My code is as follows.
FXmppServer XmppServer;
XmppServer.bUseSSL = true;
XmppServer.ClientResource = TEXT("ue_xmpp_test");
XmppServer.ServerAddr = TEXT("127.0.0.1");
XmppServer.Domain = TEXT("localhost.net");
XmppServer.ServerPort = 5222;
FString UserName = TEXT("test");
FString Password = TEXT("123456");
TSharedPtr<IXmppConnection> Connection = FXmppModule::Get().GetConnection(UserName);
if (Connection.IsValid() &&
Connection->GetLoginStatus() == EXmppLoginStatus::LoggedIn)
{
if (GEngine)
{
GEngine->AddOnScreenDebugMessage(-1, 3.0f, FColor::Red, TEXT("Already logged in."));
}
}
else
{
Connection = FXmppModule::Get().CreateConnection(UserName);
Connection->SetServer(XmppServer);
Connection->Login(UserName, Password);
}