code: def put_cancel(self):
          
          logger.info('Sending CANCEL')
          self._writer.begin_packet(tds_base.PacketType.CANCEL)
          self._writer.flush()
          self.in_cancel = 1
docs: Sends a cancel request to the server.
  
          Switches connection to IN_CANCEL state.