             }
         }
     }
+
+    enum SOCKS5ProxyWriteStatus: CustomStringConvertible {
+        case invalid,
+        sendingResponse,
+        forwarding,
+        stopped
+
+        var description: String {
+            switch self {
+            case .invalid:
+                return "invalid"
+            case .sendingResponse:
+                return "sending response"
+            case .forwarding:
+                return "forwarding"
+            case .stopped:
+                return "stopped"
+            }
+        }
+    }
     /// The remote host to connect to.
     public var destinationHost: String!
 
     /// The remote port to connect to.
     public var destinationPort: Int!
 
-    var internalStatus: SOCKS5ProxyStatus = .invalid
+    private var readStatus: SOCKS5ProxyReadStatus = .invalid
+    private var writeStatus: SOCKS5ProxyWriteStatus = .invalid
+    
+    public override var readStatusDescription: String {
+        return readStatus.description
+    }
+    
+    public override var writeStatusDescription: String {
+        return writeStatus.description
+    }
 
     /**
      Begin reading and processing data from the socket.

    override public func didRead(data: Data, from: RawTCPSocketProtocol) {
        super.didRead(data: data, from: from)

        switch internalStatus {
        case .waitingToForward:
            internalStatus = .forwarding
            delegate?.didRead(data: data, from: self)
        case .forwarding:
            delegate?.didRead(data: data, from: self)
        case .readingVersionIdentifierAndNumberOfMethods:

        responseBytes[0...3] = [0x05, 0x00, 0x00, 0x01]
        let responseData = Data(bytes: responseBytes)

        writeStatus = .sendingResponse
        write(data: responseData)
    }
}
