---
title: "CFWriteStreamClose(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfwritestreamclose(_:)"
---

# CFWriteStreamClose(_:)

Closes a writable stream.

## Declaration

```swift
func CFWriteStreamClose(_ stream: CFWriteStream!)
```

## Parameters

- `stream`: The stream to close.

## Discussion

Discussion This function terminates the flow of bytes and releases any system resources required by the stream. The stream is removed from any run loops in which it was scheduled. Once closed, the stream cannot be reopened.

## See Also

### Opening and Closing a Stream

- [CFWriteStreamOpen(_:)](corefoundation/cfwritestreamopen(_:).md)
