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

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

Issue 359673002: - Remove Dart_ReceivePortGetId, Dart_GetReceivePort and Dart_PostMessage. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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/eventhandler_patch.dart ('k') | runtime/include/dart_api.h » ('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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 } else { 838 } else {
839 sendToEventHandler(1 << SHUTDOWN_READ_COMMAND); 839 sendToEventHandler(1 << SHUTDOWN_READ_COMMAND);
840 } 840 }
841 isClosedRead = true; 841 isClosedRead = true;
842 } 842 }
843 } 843 }
844 844
845 void sendToEventHandler(int data) { 845 void sendToEventHandler(int data) {
846 assert(!isClosing); 846 assert(!isClosing);
847 connectToEventHandler(); 847 connectToEventHandler();
848 _EventHandler._sendData(this, eventPort, data); 848 _EventHandler._sendData(this, eventPort.sendPort, data);
849 } 849 }
850 850
851 void connectToEventHandler() { 851 void connectToEventHandler() {
852 assert(!isClosed); 852 assert(!isClosed);
853 if (eventPort == null) { 853 if (eventPort == null) {
854 eventPort = new RawReceivePort(multiplex); 854 eventPort = new RawReceivePort(multiplex);
855 _sockets[_serviceId] = this; 855 _sockets[_serviceId] = this;
856 } 856 }
857 } 857 }
858 858
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 String address, 1902 String address,
1903 List<int> in_addr, 1903 List<int> in_addr,
1904 int port) { 1904 int port) {
1905 return new Datagram( 1905 return new Datagram(
1906 data, 1906 data,
1907 new _InternetAddress(address, null, in_addr), 1907 new _InternetAddress(address, null, in_addr),
1908 port); 1908 port);
1909 } 1909 }
1910 1910
1911 String _socketsStats() => _SocketsObservatory.toJSON(); 1911 String _socketsStats() => _SocketsObservatory.toJSON();
OLDNEW
« no previous file with comments | « runtime/bin/eventhandler_patch.dart ('k') | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698