| 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("dart:isolate"); | 7 import 'dart:isolate'; |
| 8 #import("dart:json"); | 8 import 'dart:json'; |
| 9 #import("dart:math"); | 9 import 'dart:math'; |
| 10 | 10 |
| 11 void startChatServer() { | 11 void startChatServer() { |
| 12 var server = new ChatServer(); | 12 var server = new ChatServer(); |
| 13 server.init(); | 13 server.init(); |
| 14 port.receive(server.dispatch); | 14 port.receive(server.dispatch); |
| 15 } | 15 } |
| 16 | 16 |
| 17 class ChatServer extends IsolatedServer { | 17 class ChatServer extends IsolatedServer { |
| 18 } | 18 } |
| 19 | 19 |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 } | 684 } |
| 685 } | 685 } |
| 686 | 686 |
| 687 int _timeRange; | 687 int _timeRange; |
| 688 List<int> _buckets; | 688 List<int> _buckets; |
| 689 int _currentBucket; | 689 int _currentBucket; |
| 690 int _currentBucketTime; | 690 int _currentBucketTime; |
| 691 num _bucketTimeRange; | 691 num _bucketTimeRange; |
| 692 int _sum; | 692 int _sum; |
| 693 } | 693 } |
| OLD | NEW |