DTLS and UDP are used between server and client.

I know that DTLS is connectionless and does not attempt to detect peer
failure.

question one:
if the client ends abnormally when the handshake is not over yet, how does
the server know that client is gone?
i guess that the server have to wait until the handshake timeout.

question two:
i have done two tests;
test one:
i use "atxit()" to register a function(void newclient(void)) in main();
void newclient(void)
{
sysytem("./client");
}

my push funciton as follows:
int times;
       ssize_t push_func(gnutls_transport_ptr_t p, const void *data, size_t
size)       { if(times++ == 4) { exit(1);          } return sendto(...); }

result:
./client print "handshake timeout"
./server print "handshake timeout"

test two:

i use "atexit()" to register a function(void newclient(void)) in main();

i call "exit(1)" when the client successfully completed the handshake while
server call "gnutls_record_recv()"

result:
./client print "handshake timeout"
./server print "rev timeout"

how should i correctly use dtls to handle the udp reconnection?
i wonder if there are any examples i can refer to!

thanks in advance!

2017-08-20 1:32 GMT+08:00 Wei Cheng <[email protected]>:

> DTLS and UDP are used between server and client.
>
> I know that DTLS is connectionless and does not attempt to detect peer
> failure.
>
> question one:
> if the client ends abnormally when the handshake is not over yet, how does
> the server know that client is gone?
> i guess that the server have to wait until the handshake timeout.
>
> question two:
> i have done two test.
>
>
_______________________________________________
Gnutls-help mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnutls-help

Reply via email to