]> Cypherpunks repositories - gostls13.git/commit
net: document dummy byte in ReadMsgUnix and WriteMsgUnix
authorAlberto Bertogli <albertito@blitiri.com.ar>
Thu, 15 Sep 2016 01:32:44 +0000 (02:32 +0100)
committerIan Lance Taylor <iant@golang.org>
Thu, 15 Sep 2016 23:42:46 +0000 (23:42 +0000)
commite727e37090de987f2fafd48a02cd39455dff2ca5
tree7ed57660a6fcb2ebf2269cf44670761708e6d00e
parent897c0ebf61daaaf9c02be577f1afcb2c67ff3ed5
net: document dummy byte in ReadMsgUnix and WriteMsgUnix

ReadMsgUnix and WriteMsgUnix both will read/write 1 byte from/to the
socket if they were given no buffer to read/write, to avoid a common
pitfall in out of band operations (they will usually block
indefinitely if there's no actual data to read).

This patch adds a note about this behaviour in their documentation, so
users can be aware of it.

Change-Id: I751f0e12bb4d80311e94ea8de023595c5d40ec3e
Reviewed-on: https://go-review.googlesource.com/29180
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/unixsock.go