Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
olsky committed May 31, 2016
1 parent c24df64 commit 3dc592a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/simple.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:- use_module(library(mqtt)).

simple_pub(Topic, Value) :-
mqtt_connect(A, 'localhost', 1883, [alias(swi_mqtt), client_id(swi_mqtt_client), keepalive(120), is_async(false)]),
mqtt_pub(A, Topic, Value),
mqtt_disconnect(A).

0 comments on commit 3dc592a

Please sign in to comment.