| OLD | NEW |
| 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 patch class RawServerSocket { | 5 patch class RawServerSocket { |
| 6 /* patch */ static Future<RawServerSocket> bind(address, | 6 /* patch */ static Future<RawServerSocket> bind(address, |
| 7 int port, | 7 int port, |
| 8 {int backlog: 0, | 8 {int backlog: 0, |
| 9 bool v6Only: false}) { | 9 bool v6Only: false}) { |
| 10 return _RawServerSocket.bind(address, port, backlog, v6Only); | 10 return _RawServerSocket.bind(address, port, backlog, v6Only); |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 int get remotePort => _socket.remotePort; | 693 int get remotePort => _socket.remotePort; |
| 694 | 694 |
| 695 InternetAddress get address => _socket.address; | 695 InternetAddress get address => _socket.address; |
| 696 | 696 |
| 697 String get remoteHost => _socket.remoteHost; | 697 String get remoteHost => _socket.remoteHost; |
| 698 | 698 |
| 699 bool get readEventsEnabled => _readEventsEnabled; | 699 bool get readEventsEnabled => _readEventsEnabled; |
| 700 void set readEventsEnabled(bool value) { | 700 void set readEventsEnabled(bool value) { |
| 701 if (value != _readEventsEnabled) { | 701 if (value != _readEventsEnabled) { |
| 702 _readEventsEnabled = value; | 702 _readEventsEnabled = value; |
| 703 if (_controller.hasListener && !_controller.isPaused) _resume(); | 703 if (!_controller.isPaused) _resume(); |
| 704 } | 704 } |
| 705 } | 705 } |
| 706 | 706 |
| 707 bool get writeEventsEnabled => _writeEventsEnabled; | 707 bool get writeEventsEnabled => _writeEventsEnabled; |
| 708 void set writeEventsEnabled(bool value) { | 708 void set writeEventsEnabled(bool value) { |
| 709 if (value != _writeEventsEnabled) { | 709 if (value != _writeEventsEnabled) { |
| 710 _writeEventsEnabled = value; | 710 _writeEventsEnabled = value; |
| 711 if (_controller.hasListener && !_controller.isPaused) _resume(); | 711 if (!_controller.isPaused) _resume(); |
| 712 } | 712 } |
| 713 } | 713 } |
| 714 | 714 |
| 715 bool setOption(SocketOption option, bool enabled) => | 715 bool setOption(SocketOption option, bool enabled) => |
| 716 _socket.setOption(option, enabled); | 716 _socket.setOption(option, enabled); |
| 717 | 717 |
| 718 _pause() { | 718 _pause() { |
| 719 _socket.setListening(read: false, write: false); | 719 _socket.setListening(read: false, write: false); |
| 720 } | 720 } |
| 721 | 721 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 if (_detachReady != null) { | 1065 if (_detachReady != null) { |
| 1066 _detachReady.complete(null); | 1066 _detachReady.complete(null); |
| 1067 } else { | 1067 } else { |
| 1068 if (_raw != null) { | 1068 if (_raw != null) { |
| 1069 _raw.shutdown(SocketDirection.SEND); | 1069 _raw.shutdown(SocketDirection.SEND); |
| 1070 _disableWriteEvent(); | 1070 _disableWriteEvent(); |
| 1071 } | 1071 } |
| 1072 } | 1072 } |
| 1073 } | 1073 } |
| 1074 } | 1074 } |
| OLD | NEW |