]> Cypherpunks.ru repositories - gostls13.git/commit
crypto/tls: add CloseWrite method to Conn
authorBen Burkert <ben@benburkert.com>
Mon, 17 Oct 2016 21:47:48 +0000 (14:47 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 26 Oct 2016 23:05:40 +0000 (23:05 +0000)
commit829aa6732a47db75dbb649837fa888030659ccf9
treecd238b108e3152edec123f4328154e54e4f19f40
parent8eca08611ac1c65622400f526ab5b9065a4c9d67
crypto/tls: add CloseWrite method to Conn

The CloseWrite method sends a close_notify alert record to the other
side of the connection. This record indicates that the sender has
finished sending on the connection. Unlike the Close method, the sender
may still read from the connection until it recieves a close_notify
record (or the underlying connection is closed). This is analogous to a
TCP half-close.

This is a rework of CL 25159 with fixes for the unstable test.

Updates #8579

Change-Id: I47608d2f82a88baff07a90fd64c280ed16a60d5e
Reviewed-on: https://go-review.googlesource.com/31318
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/tls/conn.go
src/crypto/tls/tls_test.go