Index: samples/chat/chat_server_lib.dart |
diff --git a/samples/chat/chat_server_lib.dart b/samples/chat/chat_server_lib.dart |
index 5741417947238fc934bc7cd3dc32acc44930373a..628cd9a49c8ef74b0d7ade3659bbc8b3e7415f8c 100644 |
--- a/samples/chat/chat_server_lib.dart |
+++ b/samples/chat/chat_server_lib.dart |
@@ -377,7 +377,7 @@ class IsolatedServer { |
void _joinHandler(HttpRequest request, HttpResponse response) { |
StringBuffer body = new StringBuffer(); |
request.listen( |
- (data) => body.add(new String.fromCharCodes(data)), |
+ (data) => body.write(new String.fromCharCodes(data)), |
onDone: () { |
String data = body.toString(); |
if (data != null) { |
@@ -411,7 +411,7 @@ class IsolatedServer { |
void _leaveHandler(HttpRequest request, HttpResponse response) { |
StringBuffer body = new StringBuffer(); |
request.listen( |
- (data) => body.add(new String.fromCharCodes(data)), |
+ (data) => body.write(new String.fromCharCodes(data)), |
onDone: () { |
String data = body.toString(); |
var requestData = json.parse(data); |
@@ -441,7 +441,7 @@ class IsolatedServer { |
void _messageHandler(HttpRequest request, HttpResponse response) { |
StringBuffer body = new StringBuffer(); |
request.listen( |
- (data) => body.add(new String.fromCharCodes(data)), |
+ (data) => body.write(new String.fromCharCodes(data)), |
onDone: () { |
String data = body.toString(); |
_messageCount++; |
@@ -478,7 +478,7 @@ class IsolatedServer { |
void _receiveHandler(HttpRequest request, HttpResponse response) { |
StringBuffer body = new StringBuffer(); |
request.listen( |
- (data) => body.add(new String.fromCharCodes(data)), |
+ (data) => body.write(new String.fromCharCodes(data)), |
onDone: () { |
String data = body.toString(); |
var requestData = json.parse(data); |