OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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("chat_server"); | 5 #library("chat_server"); |
6 #import("dart:io"); | 6 #import("dart:io"); |
7 #import("http.dart"); | 7 #import("http.dart"); |
8 #import("../../client/json/dart_json.dart"); | 8 #import("../../lib/json/json.dart"); |
9 | 9 |
10 typedef void RequestHandler(HTTPRequest request, HTTPResponse response); | 10 typedef void RequestHandler(HTTPRequest request, HTTPResponse response); |
11 | 11 |
12 class ChatServer extends IsolatedServer { | 12 class ChatServer extends IsolatedServer { |
13 ChatServer() : super() { | 13 ChatServer() : super() { |
14 addHandler("/", | 14 addHandler("/", |
15 (HTTPRequest request, HTTPResponse response) => | 15 (HTTPRequest request, HTTPResponse response) => |
16 redirectPageHandler( | 16 redirectPageHandler( |
17 request, response, "dart_client/index.html")); | 17 request, response, "dart_client/index.html")); |
18 addHandler("/js_client/index.html", | 18 addHandler("/js_client/index.html", |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 } | 739 } |
740 } | 740 } |
741 | 741 |
742 int _timeRange; | 742 int _timeRange; |
743 List<int> _buckets; | 743 List<int> _buckets; |
744 int _currentBucket; | 744 int _currentBucket; |
745 int _currentBucketTime; | 745 int _currentBucketTime; |
746 num _bucketTimeRange; | 746 num _bucketTimeRange; |
747 int _sum; | 747 int _sum; |
748 } | 748 } |
OLD | NEW |