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

Side by Side Diff: pkg/analysis_server/lib/http_server.dart

Issue 801543002: Rework instrumentation API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean-up Created 6 years 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 | « pkg/analysis_server/lib/driver.dart ('k') | pkg/analysis_server/lib/src/analysis_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 http.server; 5 library http.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:analysis_server/src/channel/web_socket_channel.dart'; 10 import 'package:analysis_server/src/channel/web_socket_channel.dart';
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 }); 102 });
103 } 103 }
104 104
105 /** 105 /**
106 * Handle an UPGRADE request received by the HTTP server by creating and 106 * Handle an UPGRADE request received by the HTTP server by creating and
107 * running an analysis server on a [WebSocket]-based communication channel. 107 * running an analysis server on a [WebSocket]-based communication channel.
108 */ 108 */
109 void _handleWebSocket(WebSocket socket) { 109 void _handleWebSocket(WebSocket socket) {
110 socketServer.createAnalysisServer( 110 socketServer.createAnalysisServer(
111 new WebSocketServerChannel(socket, socketServer.instrumentationServer)); 111 new WebSocketServerChannel(socket, socketServer.instrumentationService)) ;
112 } 112 }
113 113
114 /** 114 /**
115 * Return an error in response to an unrecognized request received by the HTTP 115 * Return an error in response to an unrecognized request received by the HTTP
116 * server. 116 * server.
117 */ 117 */
118 void _returnUnknownRequest(HttpRequest request) { 118 void _returnUnknownRequest(HttpRequest request) {
119 HttpResponse response = request.response; 119 HttpResponse response = request.response;
120 response.statusCode = HttpStatus.NOT_FOUND; 120 response.statusCode = HttpStatus.NOT_FOUND;
121 response.headers.add(HttpHeaders.CONTENT_TYPE, "text/plain"); 121 response.headers.add(HttpHeaders.CONTENT_TYPE, "text/plain");
122 response.write('Not found'); 122 response.write('Not found');
123 response.close(); 123 response.close();
124 } 124 }
125 } 125 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/driver.dart ('k') | pkg/analysis_server/lib/src/analysis_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698