Created
October 24, 2012 12:27
-
-
Save Gerjo/3945805 to your computer and use it in GitHub Desktop.
Events in Guerrilla tactics
This file contains hidden or 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
registerEvent(IDENT_IAM, [this] (Packet* packet) -> Packet* { | |
_state = IDENT_ACCEPTED; | |
return new Packet(PacketTypes::IDENT_ACCEPTED, "Welcome."); | |
}); | |
registerEvent(PING, [this] (Packet* packet) -> Packet* { | |
return new Packet(PacketTypes::PONG, "PONG"); | |
}); | |
registerEvent(REQUEST_LARGE_PACKET, [this] (Packet* packet) -> Packet* { | |
string str; | |
str.insert(0, 1000000, 'X'); | |
return new Packet(PacketTypes::REPLY_LARGE_PACKET, str); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment