gboolean g_socket_shutdown ( GSocket* socket, gboolean shutdown_read, gboolean shutdown_write, GError** error )
Shut down part or all of a full-duplex connection.
TRUE then the receiving side of the connection
is shut down, and further reading is disallowed.
TRUE then the sending side of the connection
is shut down, and further writing is disallowed.
It is allowed for both
shutdown_write to be
One example where it is useful to shut down only one side of a connection 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.
Available since: 2.22
Whether to shut down the read side.
Whether to shut down the write side.
The return location for a recoverable error.
The argument can be
If the return location is not
NULL, then you must initialize it to a
The argument will left initialized to
NULLby the method if there are no errors.
In case of error, the argument will be set to a newly allocated
GError; the caller will take ownership of the data, and be responsible for freeing it.