-
Notifications
You must be signed in to change notification settings - Fork 1k
Dart
Alexandre Ardhuin edited this page Jun 15, 2016
·
2 revisions
The websocketd works by writing to stdin and reading from stdout.
Here's a simple echo.dart
program that reads stdio
lines and writes a basic response.
import 'dart:io';
import 'dart:convert';
main() {
stdin
.transform(SYSTEM_ENCODING.decoder)
.transform(new LineSplitter())
.listen((data) => print('You sent me : $data'));
}
You can use it with:
websocketd dart echo.dart
The websocketd user guide is a publicly editable wiki. Please contribute!
Getting Started
Reference
Language specific
Advanced: Internals
Spanish Websocket Wiki
Primeros pasos
Referencia
Lenguajes
Avanzado