| Index: runtime/bin/socket.dart
|
| diff --git a/runtime/bin/socket.dart b/runtime/bin/socket.dart
|
| index 86d5e5f26537728db7f4d8e91c31dae78be5b424..83b16b288cfef5098f27d5c2967a7ce46d87c089 100644
|
| --- a/runtime/bin/socket.dart
|
| +++ b/runtime/bin/socket.dart
|
| @@ -2,12 +2,14 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -interface ServerSocket default _ServerSocket {
|
| +abstract class ServerSocket {
|
| /**
|
| * Constructs a new server socket, binds it to a given address and port,
|
| * and listens on it.
|
| */
|
| - ServerSocket(String bindAddress, int port, int backlog);
|
| + factory ServerSocket(String bindAddress, int port, int backlog) {
|
| + return new _ServerSocket(bindAddress, port, backlog);
|
| + }
|
|
|
| /**
|
| * The connection handler gets called when there is a new incoming
|
| @@ -32,13 +34,13 @@ interface ServerSocket default _ServerSocket {
|
| }
|
|
|
|
|
| -interface Socket extends Hashable default _Socket {
|
| +abstract class Socket implements Hashable {
|
| /**
|
| * Constructs a new socket and initiate connecting it to the given
|
| * host on the given port. The returned socket is not yet connected
|
| * but ready for registration of callbacks.
|
| */
|
| - Socket(String host, int port);
|
| + factory Socket(String host, int port) => new _Socket(host, port);
|
|
|
| /**
|
| * Returns the number of received and non-read bytes in the socket that
|
| @@ -125,7 +127,7 @@ interface Socket extends Hashable default _Socket {
|
| * possible to read data. Calling [close] will not trigger a call to
|
| * [onClosed].
|
| */
|
| - void close([bool halfClose]);
|
| + void close([bool halfClose = false]);
|
|
|
| /**
|
| * Socket is hashable.
|
|
|