getErrorNumber static method
get the message
error number if message
is an error.
Implementation
static int getErrorNumber(List<int> message) {
if (message.length > 1) {
if (message[0] == SocketHelper._upgradeHeader) return 0;
var error = message[1];
if ((((error & 0xFF) << 4) & 0xFF) > 0) return 0;
return (error & 0xFF) >> 4;
}
return 0;
}