Extracted from Pike v7.6 release 61 at 2005-12-30.
pike.ida.liu.se
[Top]
SSL
SSL.sslfile

Method SSL.sslfile()->close()


Method close

int close(void|string how, void|int clean_close)

Description

Close the connection. Both the read and write ends are always closed - the argument how is only for Stdio.File compatibility and must be either "rw" or 0.

If clean_close is set then close messages are exchanged to shut down the SSL connection but not the underlying stream. It may then continue to be used for other communication afterwards. The default is to send a close message and then close the stream without waiting for a response.

Returns zero and sets the errno to System.EBADF if the connection already is closed. Other I/O errors are thrown.

Note

In nonblocking mode the stream isn't closed right away and the backend will be used for a while afterwards. If there's an I/O problem it won't be signalled immediately.

Note

I/O errors from both reading and writing might occur in blocking mode.

Note

If a clean close is requested and data following the close message is received at the same time, then this object will read it and has no way to undo that. That data can be retrieved with read afterwards.