TCP class flag method #[] refactoring