Created
December 31, 2014 02:33
-
-
Save SammyJames/957bc56219d7fd5056f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ( auto it = ConnectedSockets.cbegin(); it != ConnectedSockets.cend(); ++it ) | |
{ | |
if ( send( it->second, buffer, wrapper.ByteSize() + 4, 0 ) < 0 ) | |
{ | |
fprintf( stderr, "Failed to send packet to '%s' (error = %s)\n", it->first.c_str(), | |
strerror( errno ) ); | |
it = ConnectedSockets.erase( it ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment