RGtk2 (version 2.20.31)

gSocketShutdown: gSocketShutdown

Description

Shut down part of a full-duplex connection.

Usage

gSocketShutdown(object, shutdown.read, shutdown.write, .errwarn = TRUE)

Arguments

object
shutdown.read
whether to shut down the read side
shutdown.write
whether to shut down the write side
.errwarn
Whether to issue a warning on error or fail silently

Value

A list containing the following elements:
retval
[logical] TRUE on success, FALSE on error
error
GError for error reporting, or NULL to ignore.

Details

If 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