Last chance! 50% off unlimited learning
Sale ends in
Last chance! 50% off unlimited learning
Sale ends in
gSocketShutdown(object, shutdown.read, shutdown.write, .errwarn = TRUE)
object
GSocket
shutdown.read
shutdown.write
TRUE
on success, FALSE
on errorerror
GError
for error reporting, or NULL
to ignore.shutdown.read
is TRUE
then the recieving side of the connection
is shut down, and further reading is disallowed.
If shutdown.write
is TRUE
then the sending side of the connection
is shut down, and further writing is disallowed.
It is allowed for both shutdown.read
and shutdown.write
to be TRUE
.
One example where this is used is graceful disconnect for TCP connections
where you close the sending side, then wait for the other side to close
the connection, thus ensuring that the other side saw all sent data.
Since 2.22