   fileprivate var isWriteDispatchSourceSuspended = true
   fileprivate var isAcceptDispatchSourceSuspended = true
   fileprivate var socketQueue = DispatchQueue(label: "io.proximac.socket.queue")
-  fileprivate var socketReady = false
   fileprivate var preferV4 = false
   fileprivate var closeCondition: CloseCondition = .none
   fileprivate var status: SocketStatus = .initial

      status = .closed
    }

    delegateQueue?.async {
      self.delegate?.socket?(sock: self, didCloseConnection: error)
    }

  public func connect(toHost host: String, port: UInt16) throws {

    try socketQueue.sync {
      guard socketType == .tcp && (status == .initial || status == .closed) else { throw SocketError(.socketErrorIncorrectSocketStatus) }
      readQueue.removeAll()
      writeQueue.removeAll()
      status = .connecting
