1.8.2. Shutting a Socket Down

When using persistent connections it may be necessary to close only one direction of the connection to prevent any more incoming data but still be able to send the rest of the response. You can then use shutdown(mode) to disable either incoming or outgoing data or even both. .