Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tcoy

Pages: [1]
1
Network / Checking incoming data
« on: January 09, 2014, 04:10:45 am »
Currently I am using SFML to make a networking system for my game, and I have it set up with different structures that hold data and packet operator overloads for them for sending/receiving. I understand you can do
if(packet >> data)
to check if the data was extracted successfully, but could you also use that method to check incoming structure types? For example,
Player player
if(packet >> player)
{
//Packet contained data for a 'Player' struct
}
 
?

Pages: [1]