| Index: tests/standalone/src/EchoServerStreamTest.dart
|
| diff --git a/tests/standalone/src/EchoServerStreamTest.dart b/tests/standalone/src/EchoServerStreamTest.dart
|
| index 66ea572bdb27b8ec4a8789fd138d181efe2406c0..f3506c0ef4e18a352383a8c6d2a7098a096732f5 100644
|
| --- a/tests/standalone/src/EchoServerStreamTest.dart
|
| +++ b/tests/standalone/src/EchoServerStreamTest.dart
|
| @@ -139,8 +139,7 @@ class EchoServer extends TestingServer {
|
|
|
| static final int MSGSIZE = EchoServerGame.MSGSIZE;
|
|
|
| - void connectionHandler() {
|
| - Socket _client;
|
| + void connectionHandler(Socket connection) {
|
| InputStream inputStream;
|
| List<int> buffer = new List<int>(MSGSIZE);
|
| int offset = 0;
|
| @@ -148,7 +147,7 @@ class EchoServer extends TestingServer {
|
| void dataReceived() {
|
| SocketOutputStream outputStream;
|
| int bytesRead;
|
| - outputStream = _client.outputStream;
|
| + outputStream = connection.outputStream;
|
| bytesRead = inputStream.readInto(buffer, offset, MSGSIZE - offset);
|
| if (bytesRead > 0) {
|
| offset += bytesRead;
|
| @@ -166,10 +165,9 @@ class EchoServer extends TestingServer {
|
| Expect.fail("Socket error");
|
| }
|
|
|
| - _client = _server.accept();
|
| - inputStream = _client.inputStream;
|
| + inputStream = connection.inputStream;
|
| inputStream.dataHandler = dataReceived;
|
| - _client.errorHandler = errorHandler;
|
| + connection.errorHandler = errorHandler;
|
| }
|
| }
|
|
|
|
|