



@deftypefun {int} {gnutls_session_get_id} (gnutls_session_t @var{session}, void * @var{session_id}, size_t * @var{session_id_size})
@var{session}: is a @code{gnutls_session_t}  structure.

@var{session_id}: is a pointer to space to hold the session id.

@var{session_id_size}: initially should contain the maximum  @code{session_id} size and will be updated.

Returns the current session ID. This can be used if you want to
check if the next session you tried to resume was actually
resumed.  That is because resumed sessions share the same session ID
with the original session.

The session ID is selected by the server, that identify the
current session.  In TLS 1.0 and SSL 3.0 session id is always less
than 32 bytes.

@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise
an error code is returned.
@end deftypefun
