def read_frame(self): frame = Frame.read_frame(self.wrapper) if isinstance(frame, ErrorFrame): raise TChannelException(error_frame=frame) return frame
def write_frame(self, frame: Frame): frame.write(self.wrapper) self.wrapper.flush()