Merge #10865: Move CloseSocket out of SetSocketNonBlocking and pass socket as const...
commit0c70e845aa9277a4ceb8307f0ad8f1bf7511e3c8
authorWladimir J. van der Laan <laanwj@gmail.com>
Mon, 24 Jul 2017 12:58:25 +0000 (24 14:58 +0200)
committerWladimir J. van der Laan <laanwj@gmail.com>
Mon, 24 Jul 2017 14:54:42 +0000 (24 16:54 +0200)
tree0028be401164d1db4072e20c4ae8643cf23ded86
parent6ef3c7ec6233989e0dec6622ef905b32f94058ac
parent05e023f2ec8d8dc37bb0f20db1c606f06aea69f5
Merge #10865: Move CloseSocket out of SetSocketNonBlocking and pass socket as const reference

05e023f Move CloseSocket out of SetSocketNonBlocking and pass SOCKET by const reference in SetSocket* functions (Dag Robole)

Pull request description:

  Rationale:

  Readability, SetSocketNonBlocking does what it says on the tin.

  Consistency, More consistent with the rest of the API in this unit.

  Reusability, SetSocketNonBlocking can also be used by clients that may not want to close the socket on failure.

  This also moves the responsibility of closing the socket back to the caller that opened it, which in general should know better how and when to close it.

Tree-SHA512: 85027137f1b626e2b636549ee38cc757a587adcf464c84be6e65ca16e3b75d7ed1a1b21dd70dbe34c7c5d599af39e53b89932dfe3c74f91a22341ff3af5ea80a