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

Unified Diff: samples/chat/chat_stress_client.dart

Issue 9653026: Add writeString method to OutputStream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/chat/chat_server_lib.dart ('k') | samples/tests/samples/src/chat/ChatServerTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/chat/chat_stress_client.dart
diff --git a/samples/chat/chat_stress_client.dart b/samples/chat/chat_stress_client.dart
index 0a50738db514a3eee32e8c380e3d0764a1e30e6a..0e29a7eb2721eefa55925d1fa7c177b58581824e 100644
--- a/samples/chat/chat_stress_client.dart
+++ b/samples/chat/chat_stress_client.dart
@@ -56,7 +56,7 @@ class ChatStressClient {
leaveRequest["sessionId"] = sessionId;
HttpClientConnection conn = httpClient.post("127.0.0.1", port, "/leave");
conn.onRequest = (HttpClientRequest request) {
- request.writeString(JSON.stringify(leaveRequest));
+ request.outputStream.writeString(JSON.stringify(leaveRequest));
request.outputStream.close();
};
conn.onResponse = (HttpClientResponse response) {
@@ -84,9 +84,10 @@ class ChatStressClient {
messageRequest["sessionId"] = sessionId;
messageRequest["nextMessage"] = receiveMessageCount;
messageRequest["maxMessages"] = 100;
- HttpClientConnection conn = httpClient.post("127.0.0.1", port, "/receive");
+ HttpClientConnection conn =
+ httpClient.post("127.0.0.1", port, "/receive");
conn.onRequest = (HttpClientRequest request) {
- request.writeString(JSON.stringify(messageRequest));
+ request.outputStream.writeString(JSON.stringify(messageRequest));
request.outputStream.close();
};
conn.onResponse = (HttpClientResponse response) {
@@ -121,9 +122,10 @@ class ChatStressClient {
messageRequest["request"] = "message";
messageRequest["sessionId"] = sessionId;
messageRequest["message"] = "message " + sendMessageCount;
- HttpClientConnection conn = httpClient.post("127.0.0.1", port, "/message");
+ HttpClientConnection conn =
+ httpClient.post("127.0.0.1", port, "/message");
conn.onRequest = (HttpClientRequest request) {
- request.writeString(JSON.stringify(messageRequest));
+ request.outputStream.writeString(JSON.stringify(messageRequest));
request.outputStream.close();
};
conn.onResponse = (HttpClientResponse response) {
@@ -153,7 +155,7 @@ class ChatStressClient {
joinRequest["handle"] = "test1";
HttpClientConnection conn = httpClient.post("127.0.0.1", port, "/join");
conn.onRequest = (HttpClientRequest request) {
- request.writeString(JSON.stringify(joinRequest));
+ request.outputStream.writeString(JSON.stringify(joinRequest));
request.outputStream.close();
};
conn.onResponse = (HttpClientResponse response) {
« no previous file with comments | « samples/chat/chat_server_lib.dart ('k') | samples/tests/samples/src/chat/ChatServerTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698