From afab414d0138d51188e5f75cd075d2722cbe4e50 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sun, 30 Apr 2023 19:07:36 +0200 Subject: [PATCH] Client - Added a `close()` method - Call `close()` on the `BClient` at the end of the unit test --- source/bformat/client.d | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/bformat/client.d b/source/bformat/client.d index 01ae730..32fc378 100644 --- a/source/bformat/client.d +++ b/source/bformat/client.d @@ -145,6 +145,14 @@ public class BClient } } + /** + * Closes the client + */ + public void close() + { + /* Close the underlying stream */ + stream.close(); + } } version(unittest) @@ -206,4 +214,6 @@ unittest assert(receivedMessage == "ABBA"); writeln(receivedMessage); writeln(cast(string)receivedMessage); + + bClient.close(); } \ No newline at end of file