 
     // MARK: CocaAsyncSocket Callbacks
 
-    public func socket(_ sock: GCDAsyncSocket, didRead data: Data, withTag tag: Int) {
+    @objc public func socket(_ sock: GCDAsyncSocket, didRead data: Data, withTag tag: Int) {
         guard let line: String = String(data: data, encoding: .utf8) else {
             return
         }

        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")
