<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Stream/Status",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSStreamStatus"
  },
  "title" : "Stream.Status"
}
-->

# Stream.Status

The type declared for the constants listed in <doc:stream/stream_status_constants>.

```
enum Status
```

## Topics

### Enumeration Cases

[`NSStreamStatusAtEnd`](/documentation/Foundation/Stream/Status/atEnd)

There is no more data to read, or no more data can be written to the stream. When this status is returned, the stream is in a “non-blocking” mode and no data are available.

[`NSStreamStatusClosed`](/documentation/Foundation/Stream/Status/closed)

The stream is closed ([`close()`](/documentation/Foundation/Stream/close()) has been called on it).

[`NSStreamStatusError`](/documentation/Foundation/Stream/Status/error)

The remote end of the connection can’t be contacted, or the connection has been severed for some other reason.

[`NSStreamStatusNotOpen`](/documentation/Foundation/Stream/Status/notOpen)

The stream is not open for reading or writing. This status is returned before the underlying call to open a stream but after it’s been created.

[`NSStreamStatusOpen`](/documentation/Foundation/Stream/Status/open)

The stream is open, but no reading or writing is occurring.

[`NSStreamStatusOpening`](/documentation/Foundation/Stream/Status/opening)

The stream is in the process of being opened for reading or for writing. For network streams, this status might include the time after the stream was opened, but while network DNS resolution is happening.

[`NSStreamStatusReading`](/documentation/Foundation/Stream/Status/reading)

Data is being read from the stream. This status would be returned if code on another thread were to call [`streamStatus`](/documentation/Foundation/Stream/streamStatus) on the stream while a [`read(_:maxLength:)`](/documentation/Foundation/InputStream/read(_:maxLength:)) call ([`InputStream`](/documentation/Foundation/InputStream)) was in progress.

[`NSStreamStatusWriting`](/documentation/Foundation/Stream/Status/writing)

Data is being written to the stream. This status would be returned if code on another thread were to call [`streamStatus`](/documentation/Foundation/Stream/streamStatus) on the stream while a [`write(_:maxLength:)`](/documentation/Foundation/OutputStream/write(_:maxLength:)) call ([`OutputStream`](/documentation/Foundation/OutputStream)) was in progress.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Hashable`](/documentation/Swift/Hashable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)