         self.delegate?.socketDidDisconnect(client: self, error: err)
     }
 
-    public func socketDidCloseReadStream(_ sock: GCDAsyncSocket) {
+    @objc public func socketDidCloseReadStream(_ sock: GCDAsyncSocket) {
         debugPrint("SOCKET: socketDidCloseReadStream: Disconnecting so we can rerun our connection")
 
         self.doDisconnect()

        self.completionBlocks.removeAll()
    }

    public func close() {
        self.doDisconnect()
    }

    public func isConnected() -> Bool {
        return self.socket.isConnected
    }

    public func connect(host: String, port: Int, pwd: String?) {
        // We might be using a new auth or channel, so let's disconnect if we are connected
        if self.socket.isConnected {
            self.doDisconnect()


    // MARK: Redis functions

    @objc public func exec(command: String, completion: CompletionBlock?) {
        let components = command.components(separatedBy: [" "])

        self.exec(args: components, completion: completion)
    }

    @objc public func exec(args: Array<String>, completion: CompletionBlock?) {
        var commandArray = Array<String>()

        commandArray.append("*\(args.count)\r\n")
