Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: sdk/lib/io/socket.dart

Issue 641983002: - String array should be const. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 7
8 /** 8 /**
9 * [InternetAddressType] is the type an [InternetAddress]. Currently, 9 * [InternetAddressType] is the type an [InternetAddress]. Currently,
10 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported. 10 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported.
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 */ 410 */
411 class RawSocketEvent { 411 class RawSocketEvent {
412 static const RawSocketEvent READ = const RawSocketEvent._(0); 412 static const RawSocketEvent READ = const RawSocketEvent._(0);
413 static const RawSocketEvent WRITE = const RawSocketEvent._(1); 413 static const RawSocketEvent WRITE = const RawSocketEvent._(1);
414 static const RawSocketEvent READ_CLOSED = const RawSocketEvent._(2); 414 static const RawSocketEvent READ_CLOSED = const RawSocketEvent._(2);
415 static const RawSocketEvent CLOSED = const RawSocketEvent._(3); 415 static const RawSocketEvent CLOSED = const RawSocketEvent._(3);
416 final int _value; 416 final int _value;
417 417
418 const RawSocketEvent._(this._value); 418 const RawSocketEvent._(this._value);
419 String toString() { 419 String toString() {
420 return ['RawSocketEvent:READ', 420 return const ['RawSocketEvent:READ',
421 'RawSocketEvent:WRITE', 421 'RawSocketEvent:WRITE',
422 'RawSocketEvent:READ_CLOSED', 422 'RawSocketEvent:READ_CLOSED',
423 'RawSocketEvent:CLOSED'][_value]; 423 'RawSocketEvent:CLOSED'][_value];
424 } 424 }
425 } 425 }
426 426
427 /** 427 /**
428 * The [RawSocket] is a low-level interface to a socket, exposing the raw 428 * The [RawSocket] is a low-level interface to a socket, exposing the raw
429 * events signaled by the system. It's a [Stream] of [RawSocketEvent]s. 429 * events signaled by the system. It's a [Stream] of [RawSocketEvent]s.
430 */ 430 */
431 abstract class RawSocket implements Stream<RawSocketEvent> { 431 abstract class RawSocket implements Stream<RawSocketEvent> {
432 /** 432 /**
433 * Set or get, if the [RawSocket] should listen for [RawSocketEvent.READ] 433 * Set or get, if the [RawSocket] should listen for [RawSocketEvent.READ]
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 } 740 }
741 if (address != null) { 741 if (address != null) {
742 sb.write(", address = ${address.host}"); 742 sb.write(", address = ${address.host}");
743 } 743 }
744 if (port != null) { 744 if (port != null) {
745 sb.write(", port = $port"); 745 sb.write(", port = $port");
746 } 746 }
747 return sb.toString(); 747 return sb.toString();
748 } 748 }
749 } 749 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698