# std.crypto.tls: add API for sending close_notify · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/611a1fdd6df81a95a74162a0ebdd5afba94d29d4)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 611a1fdd6df81a95a74162a0ebdd5afba94d29d4

Requested commit: 611a1fdd6df81a95a74162a0ebdd5afba94d29d4

Commit: 611a1fdd6df81a95a74162a0ebdd5afba94d29d4

Tree: 7ce072a7c78bafe6c795cded942a9a32b3169e40

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.crypto.tls: add API for sending close_notify

This commit adds `writeEnd` and `writeAllEnd` in order to send data and
also notify the server that there will be no more data written.

Unfortunately, it seems most TLS implementations in the wild get this
wrong and immediately close the socket when they see a close_notify,
rather than only ending the data stream on the application layer.

```

## Parents

- [b3c8c383bbba05d9a9d28073e8e8ceba3f089ae8](https://git.cafe/gitcafe/zig/commit/b3c8c383bbba05d9a9d28073e8e8ceba3f089ae8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/611a1fdd6df81a95a74162a0ebdd5afba94d29d4?format=markdown)
