Closed juhda closed 4 years ago
Yes that's true. Those files are part of a very large networking multi-protocol library that we use internally for our needs and it's not open source (yet ?).
You have to define MQTTOnlyBSDSocket
to 1
. If you need TLS, you'll need to download and use MbedTLS
library in that case. For an example code, you have the related repository or the fully featured MQTTc
client in this repository.
The code will build and work correctly with MQTTOnlyBSDSocket
set to 1
, I meant.
I understand. Thank you for the clarification.
We have a scenario when our application is compiled with Visual Studio, in which case BSD sockets are not available. That's why I started to look around in the code and tried to change the macro; I hoped it might help. Is there any straightforward solution to build with Visual Studio?
Do you need SSL ?
Currently, I can easily add the missing Socket.hpp
file but SSLSocket.hpp
requires so much dependencies (mainly OpenSSL wrappers but also all crypto code that have nothing to do with this project).
I'm sorry I'm not using Windows anymore since many years. I know the Socket
class is cross platform, but I don't know for SSLSocket
status.
No need for SSL (currently).
Ok, should be committed now. Please try again. You'll have to run ccmake
(or cmake -DCROSSPLATFORM_SOCKET=ON
) to enable cross platform socket code before rebuilding.
There is no cross platform SSL code currently, and I don't intend to re-write one.
The cross platform socket code is not exported upon library installation right now as I'm using the code in the tests
subfolder, so you'll probably need to copy the missing files around if you intend to embed this code on windows.
Looks good. Thank you very much!
Cannot build when setting the value of
MQTTOnlyBSDSocket
to0
inlib/include/Network/Clients/MQTT.hpp
becauselib/src/Network/Clients/MQTTClient.cpp
tries to include files that do not exist in the repository.