| 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_stress_client.dart"); | 5 library chat_stress_client; |
| 6 #import("dart:io"); | 6 import 'dart:io'; |
| 7 #import("dart:json"); | 7 import 'dart:json'; |
| 8 | 8 |
| 9 | 9 |
| 10 class ChatStressClient { | 10 class ChatStressClient { |
| 11 ChatStressClient() : verbose = false, messagesToSend = 100; | 11 ChatStressClient() : verbose = false, messagesToSend = 100; |
| 12 | 12 |
| 13 void run() { | 13 void run() { |
| 14 HttpClient httpClient; // HTTP client connection factory. | 14 HttpClient httpClient; // HTTP client connection factory. |
| 15 String sessionId; // Session id when connected. | 15 String sessionId; // Session id when connected. |
| 16 int sendMessageCount; // Number of messages sent. | 16 int sendMessageCount; // Number of messages sent. |
| 17 int messageCount; | 17 int messageCount; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 int messagesToSend; | 175 int messagesToSend; |
| 176 bool verbose; | 176 bool verbose; |
| 177 } | 177 } |
| 178 | 178 |
| 179 | 179 |
| 180 void main () { | 180 void main () { |
| 181 ChatStressClient stresser = new ChatStressClient(); | 181 ChatStressClient stresser = new ChatStressClient(); |
| 182 stresser.run(); | 182 stresser.run(); |
| 183 } | 183 } |
| OLD | NEW |