-
Notifications
You must be signed in to change notification settings - Fork 63
Flags Class
Ron Hashimoto edited this page Aug 31, 2016
·
5 revisions
Flags represents a bit field.
import Flags from 'dripcap/flags';
class FieldFlags extends Flags {
constructor(value) {
let table = {
'Reserved': 0x1,
'Don\'t Fragment': 0x2,
'More Fragments': 0x4,
};
super(table, value);
}
toMsgpack() {
return [ this.value ];
}
}
let field = new FieldFlags(0x1);
Constructs an Flags from the table and the value.
Returns true if this and the given Flags has the same value.
Returns a string representing the flags.
JSON serializer interface.
MessagePack serializer interface.
This documentation is licensed under a Creative Commons Attribution 3.0 Unported License.