| Index: runtime/bin/socket_impl.dart
|
| diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
|
| index 14d3b500c5ba001c8b4ed906e59865d0d7a2b543..bf9ccf4cce069953fa75ded49a339cfe514a11bd 100644
|
| --- a/runtime/bin/socket_impl.dart
|
| +++ b/runtime/bin/socket_impl.dart
|
| @@ -169,46 +169,32 @@ class _SocketBase {
|
| abstract bool _isListenSocket();
|
| abstract bool _isPipe();
|
|
|
| - /*
|
| - * Socket id is set from native. -1 indicates that the socket was closed.
|
| - */
|
| + // Socket id is set from native. -1 indicates that the socket was closed.
|
| int _id;
|
|
|
| - /*
|
| - * Dedicated ReceivePort for socket events.
|
| - */
|
| + // Dedicated ReceivePort for socket events.
|
| ReceivePort _handler;
|
|
|
| - /*
|
| - * Poll event to handler map.
|
| - */
|
| + // Poll event to handler map.
|
| List _handlerMap;
|
|
|
| - /*
|
| - * Indicates for which poll events the socket registered handlers.
|
| - */
|
| + // Indicates for which poll events the socket registered handlers.
|
| int _handlerMask;
|
|
|
| - /*
|
| - * Indicates if native interrupts can be activated.
|
| - */
|
| + // Indicates if native interrupts can be activated.
|
| bool _canActivateHandlers;
|
|
|
| - /*
|
| - * Holds the port of the socket, null if not known.
|
| - */
|
| + // Holds the port of the socket, null if not known.
|
| int _port;
|
| }
|
|
|
|
|
| class _ServerSocket extends _SocketBase implements ServerSocket {
|
| - /*
|
| - * Constructor for server socket. First a socket object is allocated
|
| - * in which the native socket is stored. After that _createBind
|
| - * is called which creates a file descriptor and binds the given address
|
| - * and port to the socket. Null is returned if file descriptor creation or
|
| - * bind failed.
|
| - */
|
| + // Constructor for server socket. First a socket object is allocated
|
| + // in which the native socket is stored. After that _createBind
|
| + // is called which creates a file descriptor and binds the given address
|
| + // and port to the socket. Null is returned if file descriptor creation or
|
| + // bind failed.
|
| factory _ServerSocket(String bindAddress, int port, int backlog) {
|
| ServerSocket socket = new _ServerSocket._internal();
|
| if (!socket._createBindListen(bindAddress, port, backlog)) {
|
| @@ -249,13 +235,11 @@ class _ServerSocket extends _SocketBase implements ServerSocket {
|
|
|
|
|
| class _Socket extends _SocketBase implements Socket {
|
| - /*
|
| - * Constructor for socket. First a socket object is allocated
|
| - * in which the native socket is stored. After that _createConnect is
|
| - * called which creates a file discriptor and connects to the given
|
| - * host on the given port. Null is returned if file descriptor creation
|
| - * or connect failed.
|
| - */
|
| + // Constructor for socket. First a socket object is allocated
|
| + // in which the native socket is stored. After that _createConnect is
|
| + // called which creates a file discriptor and connects to the given
|
| + // host on the given port. Null is returned if file descriptor creation
|
| + // or connect failed.
|
| factory _Socket(String host, int port) {
|
| Socket socket = new _Socket._internal();
|
| if (!socket._createConnect(host, port)) {
|
|
|