int silc_fd_stream_get_error(SilcStream stream);
If error occurred during file descriptor stream operations, this function can be used to retrieve the error number that occurred.