     return button
   }()
   func close() {
+    socketUdp.close()
+    socketTcp.disconnect()
     dismiss(animated: true, completion: nil)
   }
   


  lazy var socketTcp: GCDAsyncSocket = {
    let socket = GCDAsyncSocket(delegate: self, delegateQueue: DispatchQueue.main)
    return socket
  }()

  private func reconnectTcp() {
    do {
      try self.socketTcp.connect(toHost: self.host, onPort: UInt16(self.port))
    } catch let err as NSError {

  var currentSocketMode: SocketMode = .UDP {
    didSet {
      if currentSocketMode == .UDP {
//        self.socketTcp.disconnect()
      } else {
//        self.reconnectTcp()
      }
    }
  }
