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

Unified Diff: sdk/lib/io/websocket.dart

Issue 19970004: Add ability to send a ping interval on a WebSocket. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/io/websocket_impl.dart » ('j') | sdk/lib/io/websocket_impl.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/websocket.dart
diff --git a/sdk/lib/io/websocket.dart b/sdk/lib/io/websocket.dart
index 370d694f0b04de4d0a50b0a89cb9f5241298d8d0..c30bdc83bb5f1da7fc99ab9a711546a5a6b65990 100644
--- a/sdk/lib/io/websocket.dart
+++ b/sdk/lib/io/websocket.dart
@@ -131,6 +131,18 @@ abstract class WebSocket implements Stream, StreamSink {
String get closeReason;
/**
+ * Set and get the interval for sending ping signals. If a ping message is not
+ * answered, the `WebSocket` is assumed disconnected and the connection is
Søren Gjesse 2013/07/24 11:12:45 add "by a pong message from the peer" after answer
Anders Johnsen 2013/07/24 12:14:23 Done.
+ * closed. When a ping signal is sent, the pong message must be received
Søren Gjesse 2013/07/24 11:12:45 Add information on the close status used.
Anders Johnsen 2013/07/24 12:14:23 Done.
+ * within [pingInterval].
+ *
+ * Set the [pingInterval] to `null` to disable sending ping messages.
+ *
+ * The default value is `null`.
+ */
+ Duration pingInterval;
+
+ /**
* Closes the web socket connection. Set the optional [code] and [reason]
* arguments to send close information to the remote peer. If they are
* omitted, the peer will see [WebSocketStatus.NO_STATUS_RECEIVED] code
« no previous file with comments | « no previous file | sdk/lib/io/websocket_impl.dart » ('j') | sdk/lib/io/websocket_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698