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) { |