      The socket will disconnect elegantly after any queued writing data are successfully sent.
      */
     func disconnect() {
-        self.closeAfterWriting = true
-        self.checkStatus()
+        closeAfterWriting = true
+        checkStatus()
     }
 
     /**
      Disconnect the socket immediately.
      */
     func forceDisconnect() {
-        self.tsSocket.close()
+        tsSocket.close()
     }
 
     /**

     - parameter length: The length of the data to read.
     - parameter tag:    The tag identifying the data in the callback delegate method.
     - warning: This should only be called after the last read is finished, i.e., `delegate?.didReadData()` is called.
     - warning: Not implemented yet.
     */
    func readDataToLength(length: Int, withTag tag: Int) {}

    /**
     Read data until a specific pattern (including the pattern).

     - warning: This should only be called after the last write is finished, i.e., `delegate?.didWriteData()` is called.
     */
    func writeData(data: NSData, withTag tag: Int) {
        writeTag = tag
        remainWriteLength = data.length
        tsSocket.writeData(data)
    }

    /**
