@item @ref{gnutls_transport_set_pull_function}
@item @ref{gnutls_transport_set_ptr}
@item @ref{gnutls_transport_set_lowat}
+@item @ref{gnutls_transport_set_errno}
@end itemize
These functions accept a callback function as a parameter. The
callback functions should return the number of bytes written, or -1 on
error and should set @code{errno} appropriately.
+In some environments, setting @code{errno} is unreliable, for example
+Windows have several errno variables in different CRTs, or it may be
+that errno is not a thread-local variable. If this is a concern to
+you, call @code{gnutls_transport_set_errno} with the intended errno
+value instead of setting @code{errno} directly.
+
@acronym{GnuTLS} currently only interprets the EINTR and EAGAIN errno
values and returns the corresponding @acronym{GnuTLS} error codes
@code{GNUTLS_E_INTERRUPTED} and @code{GNUTLS_E_AGAIN}. These values
are usually returned by interrupted system calls, or when non blocking
-IO is used. All @acronym{GnuTLS} functions can be resumed (called
+IO is used. All @acronym{GnuTLS} functions can be resumed (called
again), if any of these error codes is returned. The error codes
above refer to the system call, not the @acronym{GnuTLS} function,
since signals do not interrupt @acronym{GnuTLS}' functions.