diff --git a/source/libutterfly.d b/source/libutterfly.d index 7c90aca..7aff4c6 100644 --- a/source/libutterfly.d +++ b/source/libutterfly.d @@ -37,5 +37,21 @@ public final class ButterflyClient /* Send the command */ sendMessage(connection, cast(byte[])toJSON(commandBlock)); + + /* Get the status */ + JSONValue response; + + byte[] receivedBytes; + receiveMessage(connection, receivedBytes); + response = parseJSON(cast(string)receivedBytes); + + if(response["status"].integer() == 0) + { + /* TODO: Good */ + } + else + { + /* TODO: Throw an exception here */ + } } } \ No newline at end of file