Right now errors are handled by the errorHandler, but it's not possible to determine for what message the error was and thus handling it is not really possible.

It is possible to determine if the message was sent successfully if we wait for the ws to respond with either an error or confirmation.
There would need to be a mutex for the ws that gets locked every time we send a message until confirmation is received to prevent getting errors or confirmation meant for a different message.
Right now errors are handled by the errorHandler, but it's not possible to determine for what message the error was and thus handling it is not really possible.

It is possible to determine if the message was sent successfully if we wait for the ws to respond with either an error or confirmation.
There would need to be a mutex for the ws that gets locked every time we send a message until confirmation is received to prevent getting errors or confirmation meant for a different message.