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

Side by Side Diff: pkg/http/test/safe_http_server.dart

Issue 14864009: Keep track of when a socket has been destroyed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove delete_handle marker. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/scheduled_test/lib/src/scheduled_server/safe_http_server.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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library safe_http_server; 5 library safe_http_server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 // TODO(nweiz): remove this when issue 9140 is fixed. 10 // TODO(nweiz): remove this when issue 9140 is fixed.
(...skipping 12 matching lines...) Expand all
23 static Future<SafeHttpServer> bind([String host = "localhost", 23 static Future<SafeHttpServer> bind([String host = "localhost",
24 int port = 0, int backlog = 0]) { 24 int port = 0, int backlog = 0]) {
25 return HttpServer.bind(host, port, backlog: backlog) 25 return HttpServer.bind(host, port, backlog: backlog)
26 .then((server) => new SafeHttpServer(server)); 26 .then((server) => new SafeHttpServer(server));
27 } 27 }
28 28
29 SafeHttpServer(HttpServer server) 29 SafeHttpServer(HttpServer server)
30 : super(server), 30 : super(server),
31 _inner = server; 31 _inner = server;
32 32
33 void close() => _inner.close(); 33 Future close() => _inner.close();
34 34
35 int get port => _inner.port; 35 int get port => _inner.port;
36 36
37 set sessionTimeout(int timeout) { 37 set sessionTimeout(int timeout) {
38 _inner.sessionTimeout = timeout; 38 _inner.sessionTimeout = timeout;
39 } 39 }
40 40
41 HttpConnectionsInfo connectionsInfo() => _inner.connectionsInfo(); 41 HttpConnectionsInfo connectionsInfo() => _inner.connectionsInfo();
42 42
43 StreamSubscription<HttpRequest> listen(void onData(HttpRequest value), 43 StreamSubscription<HttpRequest> listen(void onData(HttpRequest value),
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 Future<HttpResponse> addStream(Stream<List<int>> stream) => 132 Future<HttpResponse> addStream(Stream<List<int>> stream) =>
133 _inner.addStream(stream); 133 _inner.addStream(stream);
134 Future close() => _inner.close(); 134 Future close() => _inner.close();
135 void write(Object obj) => _inner.write(obj); 135 void write(Object obj) => _inner.write(obj);
136 void writeAll(Iterable objects, [String separator = ""]) => 136 void writeAll(Iterable objects, [String separator = ""]) =>
137 _inner.writeAll(objects, separator); 137 _inner.writeAll(objects, separator);
138 void writeCharCode(int charCode) => _inner.writeCharCode(charCode); 138 void writeCharCode(int charCode) => _inner.writeCharCode(charCode);
139 void writeln([Object obj = ""]) => _inner.writeln(obj); 139 void writeln([Object obj = ""]) => _inner.writeln(obj);
140 void addError(error) => _inner.addError(error); 140 void addError(error) => _inner.addError(error);
141 } 141 }
OLDNEW
« no previous file with comments | « no previous file | pkg/scheduled_test/lib/src/scheduled_server/safe_http_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698