 class TCPClientViewController: NSViewController {
 
     let port = UInt16(40000)
-    var clientChannel: TCPChannel!
+    var clientChannel: TCPChannel?
     var count: Int = 0
 
     dynamic var reconnect: Bool = false

    }

    @IBAction func disconnect(sender: AnyObject?) {
        clientChannel.disconnect() {
            (result) in
            SwiftIO.log?.debug("Client disconnect callback: \(result)")

        super.viewDidLoad()
    }

    func createClient() throws -> TCPChannel {
        let address = try Address(address: "localhost", port: port)
        let clientChannel = TCPChannel(address: address)
        clientChannel.configureSocket = {
            socket in

