Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. std::cout << "Finished search for LAN lobbies." << std::endl;
  2.  
  3. myLANFetching.myIsFetching = false;
  4.  
  5. for (unsigned short i = 0; i < myLANFetching.myFetchedLANGames.Size(); ++i)
  6. {
  7. std::cout << "Lobby " << i << ": " << myLANFetching.myFetchedLANGames[i].myAddressString << ":" << myLANFetching.myFetchedLANGames[i].myPort << std::endl;
  8.  
  9. myConnectedServer.myServerIP = myLANFetching.myFetchedLANGames[i].myAddressString;
  10. myConnectedServer.myServerPort = myLANFetching.myFetchedLANGames[i].myPort;
  11. }
  12.  
  13. for (unsigned short i = 0; i < myLANFetching.myFetchedLANGames.Size(); ++i)
  14. {
  15. if (myLANFetching.myFetchedLANGames[i].myAddressString == mySocket->GetLocalIP())
  16. {
  17. std::cout << "Found lobby on local machine, connecting. " << std::endl;
  18. myConnectedServer.myServerIP = myLANFetching.myFetchedLANGames[i].myAddressString;
  19. myConnectedServer.myServerPort = myLANFetching.myFetchedLANGames[i].myPort;
  20. }
  21. }
  22.  
  23. std::cout << "Connecting to the first lobby found.." << std::endl;
  24. Handshake(0.f);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement