Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Game::Receive()
- {
- sf::Packet Packet;
- sf::IPAddress IP;
- unsigned short port;
- Listen.Receive(Packet, IP, port);
- int PType = -1;
- Packet >> PType;
- std::cout << "Packet Received! " << IP << " " << PType << std::endl;
- if(IP != "255.255.255.255")
- {
- switch (PType)
- {
- // Handle data
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement