| Index: runtime/bin/socket_patch.dart
|
| diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
|
| index e697822396c1cfa1b350ed3dc47e915533ecaa98..f17f1d979a406ff036770cb4245fa773e94dd4a8 100644
|
| --- a/runtime/bin/socket_patch.dart
|
| +++ b/runtime/bin/socket_patch.dart
|
| @@ -392,6 +392,8 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
|
| close();
|
| }
|
|
|
| + bool setNoDelay(bool enabled) => nativeSetNoDelay(enabled);
|
| +
|
| nativeAvailable() native "Socket_Available";
|
| nativeRead(int len) native "Socket_Read";
|
| nativeWrite(List<int> buffer, int offset, int bytes)
|
| @@ -403,6 +405,7 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
|
| int nativeGetPort() native "Socket_GetPort";
|
| List nativeGetRemotePeer() native "Socket_GetRemotePeer";
|
| OSError nativeGetError() native "Socket_GetError";
|
| + bool nativeSetNoDelay(bool enabled) native "Socket_SetNoDelay";
|
|
|
| static SendPort newServicePort() native "Socket_NewServicePort";
|
| }
|
| @@ -571,6 +574,8 @@ class _RawSocket extends Stream<RawSocketEvent>
|
| }
|
| }
|
|
|
| + bool setNoDelay([bool enabled = true]) => _socket.setNoDelay(enabled);
|
| +
|
| _pause() {
|
| _socket.setListening(read: false, write: false);
|
| }
|
| @@ -800,6 +805,11 @@ class _Socket extends Stream<List<int>> implements Socket {
|
| _controller.close();
|
| }
|
|
|
| + bool setNoDelay([bool enabled = true]) {
|
| + if (_raw == null) return false;
|
| + return _raw.setNoDelay(enabled);
|
| + }
|
| +
|
| int get port => _raw.port;
|
| String get remoteHost => _raw.remoteHost;
|
| int get remotePort => _raw.remotePort;
|
|
|