blob: 63e94cab571633d25a97ceea5262f8375f99c0f7 [file] [log] [blame]
/*
* Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion Duration pingInterval
* Set and get the interval for sending ping signals.
* ...
* The default value is null.
* @description Checks that the default value of [pingInterval] is null.
* @author ngl@unipro.ru
*/
import "dart:io";
import "../../../Utils/expect.dart";
main() {
HttpServer.bind("127.0.0.1", 0).then((server) {
server.listen((request) {
WebSocketTransformer
.upgrade(request)
.then((websocket) {
Expect.isTrue(websocket.pingInterval == null);
websocket.close();
});
});
var webs = WebSocket.connect("ws://127.0.0.1:${server.port}/");
webs.then((client) {
client.close().then((_) {
server.close();
});
});
});
}