def _process(self, data_buffer):
packet = json.loads(data_buffer)<EOL>if packet['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>original_mode = DWORD(<NUM_LIT:0>)<EOL>windll.kernel32.GetConsoleMode(self._hconsole, byref(original_mode))<EOL>windll.kernel32.SetConsoleMode(self._hconsole, DWORD(<EOL>ENABLE_PROCESSED_INPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING))<EOL>try:<EOL><INDENT>os.write(sys.stdout.fileno(), packet['<STR_LIT:data>'].encode('<STR_LIT:utf-8>'))<EOL><DEDENT>finally:<EOL><INDENT>windll.kernel32.SetConsoleMode(self._hconsole, original_mode)<EOL><DEDENT><DEDENT>elif packet['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>pass<EOL><DEDENT>elif packet['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>pass<EOL><DEDENT>
Handle incoming packet from server.