@@ -24,6 +24,8 @@ await transport.HandshakeAsync();
2424
2525await transport .SendAsync (data );
2626int bytesRead = await transport .ReceiveAsync (buffer );
27+
28+ await transport .CloseAsync ();
2729```
2830
2931### Server
@@ -59,13 +61,14 @@ public interface IDatagramTransport
5961
6062Async I/O wrapper that bridges the sans-I/O protocol engine with an ` IDatagramTransport ` .
6163
62- | Method | Description |
63- | ------------------- | -------------------------- |
64- | ` CreateClientAsync ` | Create a DTLS client |
65- | ` CreateServerAsync ` | Create a DTLS server |
66- | ` HandshakeAsync ` | Perform DTLS handshake |
67- | ` SendAsync ` | Send encrypted datagram |
68- | ` ReceiveAsync ` | Receive decrypted datagram |
64+ | Method | Description |
65+ | ------------------- | -------------------------------------- |
66+ | ` CreateClientAsync ` | Create a DTLS client |
67+ | ` CreateServerAsync ` | Create a DTLS server |
68+ | ` HandshakeAsync ` | Perform DTLS handshake |
69+ | ` SendAsync ` | Send encrypted datagram |
70+ | ` ReceiveAsync ` | Receive decrypted datagram |
71+ | ` CloseAsync ` | Send ` close_notify ` for graceful shutdown |
6972
7073### DtlsSession
7174
@@ -79,6 +82,7 @@ Sans-I/O DTLS protocol engine for advanced scenarios.
7982| ` HandleTimeout ` | Handle retransmission timeout |
8083| ` Send ` | Encrypt plaintext into output |
8184| ` TryReceive ` | Try to read decrypted application data |
85+ | ` Close ` | Queue ` close_notify ` for graceful shutdown |
8286| ` VerifyPeer ` | Verify peer certificate |
8387
8488### Options
0 commit comments