So its failing into Player::Player(); i am sending a request of user data there and then enter a loop where try to recv(); packet type and then whole data of user , before that i lock Client::UserMshHandler from receiving any packet
Code: Select all
client.LockMessageHandler(true);
while (!LoadComplete)
{
PacketType ptype;
if (!client.RecvPacketType(ptype)) // always fails unless there is break point and debug mode
{
Log("Failed to recv packet");
//std::exit(1);
}
related files are :
Game.cpp // Main game loop where Client::UserMsgHandler called
Client.cpp // UserMshHandler function
GameStateLoadGame.cpp // loading game state where i initialize std::asycn to constructr next game state "GameStateGamePlay" where Player constructor is called
Player.cpp // Player class constructor where is loop to recv packets