Debian Codegraph @

doc/functions/gnutls_dtls_set_data_mtu

raw
1
2
3
4
5 @deftypefun {int} {gnutls_dtls_set_data_mtu} (gnutls_session_t @var{session}, unsigned int @var{mtu})
6 @var{session}: is a @code{gnutls_session_t} type.
7
8 @var{mtu}: The maximum unencrypted transfer unit of the session
9
10 This function will set the maximum size of the *unencrypted* records
11 which will be sent over a DTLS session. It is equivalent to calculating
12 the DTLS packet overhead with the current encryption parameters, and
13 calling @code{gnutls_dtls_set_mtu()} with that value. In particular, this means
14 that you may need to call this function again after any negotiation or
15 renegotiation, in order to ensure that the MTU is still sufficient to
16 account for the new protocol overhead.
17
18 In most cases you only need to call @code{gnutls_dtls_set_mtu()} with
19 the maximum MTU of your transport layer.
20
21 @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code.
22
23 @strong{Since:} 3.1
24 @end deftypefun