         }
     }
     
-    func checkIfConnected() -> Bool {
+    private func checkIfConnected() -> Bool {
         if socket == nil {
             connect()
             return false

        }
        
        let resultBytes: [UInt8] = [channel, command, hiByte, loByte] + pixelBytes
        let resultData = NSData(bytes: resultBytes, length: resultBytes.count * sizeof(UInt8))
        do {
            try socket?.write(from: resultData)
        } catch {
            "Print cannot send data"
        }
    }
}

    
    let hostName: String
    let port: Int32
    var configByte: UInt8 = 0
    var socket: Socket?
    
    public var dithering: Bool = true {
        didSet {
            if dithering {
                configByte &= ~0x01
            } else {
                configByte |= 0x01
            }
            sendConfigPackage()
        }
    }
    
    public var interpolation: Bool = true {
        didSet {
            if interpolation {
                configByte &= ~0x02
            } else {
                configByte |= 0x02
            }
            sendConfigPackage()
        }
    }
    
    public init(hostName: String, port: Int32) {
        self.hostName = hostName
