Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Supports:
* WebSockets
* HTTP fetcher
* Modbus [TCP]
* MQTT [TCP]
* MQTT [TCP, WebSockets]


SimpleSocket supports TLS via openssl.
Expand Down
5 changes: 4 additions & 1 deletion include/simple_socket/mqtt/MQTTBroker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ namespace simple_socket {

class MQTTBroker {
public:
explicit MQTTBroker(int port);
explicit MQTTBroker(int tcpPort);

#ifdef SIMPLE_SOCKET_WITH_WEBSOCKETS
MQTTBroker(int tcpPort, int wsPort);
#endif
void start();

void stop();
Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ if (SIMPLE_SOCKET_WITH_TLS)
target_compile_definitions(simple_socket PRIVATE SIMPLE_SOCKET_WITH_TLS=1)
target_link_libraries(simple_socket PRIVATE OpenSSL::SSL OpenSSL::Crypto)
endif ()
if (SIMPLE_SOCKET_WITH_WEBSOCKETS)
target_compile_definitions(simple_socket PUBLIC SIMPLE_SOCKET_WITH_WEBSOCKETS=1)
endif ()

target_include_directories(simple_socket
PUBLIC
Expand Down
Loading