      Send data to remote.
 
      - parameter data: Data to send.
-     - parameter tag:  The tag identifying the data in the callback delegate method.
      - warning: This should only be called after the last write is finished, i.e., `delegate?.didWriteData()` is called.
      */
-    open func writeData(_ data: Data, withTag tag: Int) {
-        writeData(data, withTimeout: -1, withTag: tag)
+    open func write(data: Data) {
+        write(data: data, withTimeout: -1)
     }
 
     /**
      Read data from the socket.
 
-     - 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.
-     */
-    open func readDataWithTag(_ tag: Int) {
-        socket.readData(withTimeout: -1, tag: tag)
+     - warning: This should only be called after the last read is finished, i.e., `delegate?.didReadData()` is called.
+     */
+    open func readData() {
+        socket.readData(withTimeout: -1, tag: 0)
     }
 
     /**
      Read specific length of data from the socket.
 
      - 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.
-     */
-    open func readDataToLength(_ length: Int, withTag tag: Int) {
-        readDataToLength(length, withTimeout: -1, withTag: tag)
+     - warning: This should only be called after the last read is finished, i.e., `delegate?.didReadData()` is called.
+     */
+    open func readDataTo(length: Int) {
+        readDataTo(length: length, withTimeout: -1)
     }
 
     /**
      Read data until a specific pattern (including the pattern).
 
      - parameter data: The pattern.
-     - 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.
-     */
-    open func readDataToData(_ data: Data, withTag tag: Int) {
-        readDataToData(data, withTag: tag, maxLength: 0)
+     - warning: This should only be called after the last read is finished, i.e., `delegate?.didReadData()` is called.
+     */
+    open func readDataTo(data: Data) {
+        readDataTo(data: data, maxLength: 0)
     }
 
     /**
      Read data until a specific pattern (including the pattern).
 
      - parameter data: The pattern.
-     - parameter tag:  The tag identifying the data in the callback delegate method.
      - parameter maxLength: Ignored since `GCDAsyncSocket` does not support this. The max length of data to scan for the pattern.
      - warning: This should only be called after the last read is finished, i.e., `delegate?.didReadData()` is called.
      */
-    open func readDataToData(_ data: Data, withTag tag: Int, maxLength: Int) {
-        readDataToData(data, withTimeout: -1, withTag: tag)
+    open func readDataTo(data: Data, maxLength: Int) {
+        readDataTo(data: data, withTimeout: -1)
     }
 
     // MARK: Other helper methods


     - throws: The error occured when connecting to host.
     */
    func connectToHost(_ host: String, withPort port: Int) throws {
        try socket.connect(toHost: host, onPort: UInt16(port))
    }



    // MARK: Delegate methods for GCDAsyncSocket
    open func socket(_ sock: GCDAsyncSocket, didWriteDataWithTag tag: Int) {
        delegate?.didWrite(data: nil, by: self)
    }

    open func socket(_ sock: GCDAsyncSocket, didRead data: Data, withTag tag: Int) {
        delegate?.didRead(data: data, from: self)
    }

    open func socketDidDisconnect(_ socket: GCDAsyncSocket, withError err: Error?) {
        delegate?.didDisconnectWith(socket: self)
        delegate = nil
        socket.setDelegate(nil, delegateQueue: nil)
    }

    open func socket(_ sock: GCDAsyncSocket, didConnectToHost host: String, port: UInt16) {
        if !enableTLS {
            delegate?.didConnectWith(socket: self)
        }
    }

    open func socketDidSecure(_ sock: GCDAsyncSocket) {
        if enableTLS {
            delegate?.didConnectWith(socket: self)
        }
    }

