In the constructor, the following code is redundant:
if (_socket.api == NULL) {
error_check(SOCKET_ERROR_NULL_PTR);
}
This is because error_check posts a Minor callback using the function stored in _onError, however at the point of construction this won't have been set and will still be NULL. Thus no callback will be registered anyway.
In the constructor, the following code is redundant:
This is because error_check posts a Minor callback using the function stored in _onError, however at the point of construction this won't have been set and will still be NULL. Thus no callback will be registered anyway.