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

Side by Side Diff: runtime/bin/socket_patch.dart

Issue 165723007: Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tiny fix. Created 6 years, 9 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 | « runtime/bin/socket_macos.cc ('k') | runtime/bin/stdio_android.cc » ('j') | 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 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 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 eventHandlers[ERROR_EVENT] = error; 829 eventHandlers[ERROR_EVENT] = error;
830 eventHandlers[CLOSED_EVENT] = closed; 830 eventHandlers[CLOSED_EVENT] = closed;
831 eventHandlers[DESTROYED_EVENT] = destroyed; 831 eventHandlers[DESTROYED_EVENT] = destroyed;
832 } 832 }
833 833
834 void setListening({read: true, write: true}) { 834 void setListening({read: true, write: true}) {
835 sendReadEvents = read; 835 sendReadEvents = read;
836 sendWriteEvents = write; 836 sendWriteEvents = write;
837 if (read) issueReadEvent(); 837 if (read) issueReadEvent();
838 if (write) issueWriteEvent(); 838 if (write) issueWriteEvent();
839 if (eventPort == null && !isClosing && !isClosed) { 839 if (eventPort == null) {
840 int flags = typeFlags & TYPE_TYPE_MASK; 840 int flags = typeFlags & TYPE_TYPE_MASK;
841 if (!isClosedRead) flags |= 1 << READ_EVENT; 841 if (!isClosedRead) flags |= 1 << READ_EVENT;
842 if (!isClosedWrite) flags |= 1 << WRITE_EVENT; 842 if (!isClosedWrite) flags |= 1 << WRITE_EVENT;
843 sendToEventHandler(flags); 843 sendToEventHandler(flags);
844 } 844 }
845 } 845 }
846 846
847 Future close() { 847 Future close() {
848 if (!isClosing && !isClosed) { 848 if (!isClosing && !isClosed) {
849 sendToEventHandler(1 << CLOSE_COMMAND); 849 sendToEventHandler(1 << CLOSE_COMMAND);
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 String address, 1754 String address,
1755 List<int> in_addr, 1755 List<int> in_addr,
1756 int port) { 1756 int port) {
1757 return new Datagram( 1757 return new Datagram(
1758 data, 1758 data,
1759 new _InternetAddress(address, null, in_addr), 1759 new _InternetAddress(address, null, in_addr),
1760 port); 1760 port);
1761 } 1761 }
1762 1762
1763 String _socketsStats() => _SocketsObservatory.toJSON(); 1763 String _socketsStats() => _SocketsObservatory.toJSON();
OLDNEW
« no previous file with comments | « runtime/bin/socket_macos.cc ('k') | runtime/bin/stdio_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698