COMP 310
|
Lec45: Lessons from the Labs |
A lot of people are assuming that the returned data packet is an Ok status and are thus ignoring it. But since the returned value of sending a data packet (via a chat room) is an iterable of data packets, without defining what those data packets are, no assumptions about those data packets can be made and they must be processed as any other data packets.
IHostand IUser must return the same UUID value otherwise it is impossible to invite a user from one chat room into another because the application only knows IUsers in chat rooms but needs the corresponding IHost in order to invite them to a new chat room. The UUID is the only way that an IUser can be associated with a particular IHost.
Very bad things will happen if you do as this will couple your entire system together. Just don't. Ever.
What does it mean for a game server to reject a packet?
Do NOT attempt to write your entire game before testing it! Develop your application small piece by small piece, continually testing it other people.
Assume that the game clients and game servers that are connected to you will behave badly and put in defensive checks to keep your system from crashing due to someone else's bad code.
© 2017 by Stephen Wong