https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/network/network.md#callbackmessage-val1-val2-1
The message is an integer - Is there a reason that the class does not define the constants?
Looking at the Pins examples, there are constants within the class for various states.
Something like:
Server.MsgDisconnected = -1;
Server.MsgConnected = 1;
Server.MsgStatus = 2;
Server.MsgHeader = 3;
Server.MsgHeaders = 4;
Server.MsgResponse = 8;
Server.MsgResFragment = 9;
Server.MsgComplete = 10;
I would think that this would make the code more readable - as the numbers on their own mean nothing.
Do you want a pull request for this sort of thing (after discussion?)
https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/network/network.md#callbackmessage-val1-val2-1
The message is an integer - Is there a reason that the class does not define the constants?
Looking at the Pins examples, there are constants within the class for various states.
Something like:
I would think that this would make the code more readable - as the numbers on their own mean nothing.
Do you want a pull request for this sort of thing (after discussion?)