Blame doc/functions/gnutls_dtls_set_data_mtu

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_dtls_set_data_mtu} (gnutls_session_t @var{session}, unsigned int @var{mtu})
Packit Service 4684c1
@var{session}: is a @code{gnutls_session_t}  type.
Packit Service 4684c1
Packit Service 4684c1
@var{mtu}: The maximum unencrypted transfer unit of the session
Packit Service 4684c1
Packit Service 4684c1
This function will set the maximum size of the *unencrypted* records
Packit Service 4684c1
which will be sent over a DTLS session. It is equivalent to calculating
Packit Service 4684c1
the DTLS packet overhead with the current encryption parameters, and
Packit Service 4684c1
calling @code{gnutls_dtls_set_mtu()}  with that value. In particular, this means
Packit Service 4684c1
that you may need to call this function again after any negotiation or
Packit Service 4684c1
renegotiation, in order to ensure that the MTU is still sufficient to
Packit Service 4684c1
account for the new protocol overhead.
Packit Service 4684c1
Packit Service 4684c1
In most cases you only need to call @code{gnutls_dtls_set_mtu()}  with
Packit Service 4684c1
the maximum MTU of your transport layer.
Packit Service 4684c1
Packit Service 4684c1
@strong{Returns:} @code{GNUTLS_E_SUCCESS}  (0) on success, or a negative error code.
Packit Service 4684c1
Packit Service 4684c1
@strong{Since:} 3.1
Packit Service 4684c1
@end deftypefun