Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: pkg/mqtt/publish-sample.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/mqtt/lib/src/mqtt_client.dart ('k') | pkg/os/lib/os.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import 'dart:fletch'; 1 import 'dart:dartino';
2 import 'package:mqtt/mqtt.dart'; 2 import 'package:mqtt/mqtt.dart';
3 3
4 // Sample code for publishing messages. 4 // Sample code for publishing messages.
5 // 5 //
6 // For an end-to-end sample, first run subscribe-sample.dart, and then start 6 // For an end-to-end sample, first run subscribe-sample.dart, and then start
7 // this program next to see the communication between the two. Note that this 7 // this program next to see the communication between the two. Note that this
8 // program has to be started in a second session, e.g. `fletch start 8 // program has to be started in a second session, e.g. `dartino start
9 // publish-sample.dart in session 2'. 9 // publish-sample.dart in session 2'.
10 void main() { 10 void main() {
11 // Create MQTT client. 11 // Create MQTT client.
12 Client c = new Client('tcp://test.mosquitto.org:1883', 'test123-client1', 12 Client c = new Client('tcp://test.mosquitto.org:1883', 'test123-client1',
13 protocolVersion: 3); 13 protocolVersion: 3);
14 14
15 // Publish some messages. 15 // Publish some messages.
16 for (int i = 1; i <= 3; i++) { 16 for (int i = 1; i <= 3; i++) {
17 c.publish('Message $i', '/foo/bar'); 17 c.publish('Message $i', '/foo/bar');
18 c.publish('Message $i', '/foo/baz'); 18 c.publish('Message $i', '/foo/baz');
19 } 19 }
20 20
21 // Clean up. 21 // Clean up.
22 c.disconnect(); 22 c.disconnect();
23 } 23 }
OLDNEW
« no previous file with comments | « pkg/mqtt/lib/src/mqtt_client.dart ('k') | pkg/os/lib/os.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698