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

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

Issue 1680593004: dart:developer service extension fixes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
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 bool shared: false}) { 10 bool shared: false}) {
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 connectToEventHandler(); 925 connectToEventHandler();
926 _EventHandler._sendData(this, eventPort.sendPort, fullData); 926 _EventHandler._sendData(this, eventPort.sendPort, fullData);
927 } 927 }
928 928
929 void connectToEventHandler() { 929 void connectToEventHandler() {
930 assert(!isClosed); 930 assert(!isClosed);
931 if (eventPort == null) { 931 if (eventPort == null) {
932 eventPort = new RawReceivePort(multiplex); 932 eventPort = new RawReceivePort(multiplex);
933 } 933 }
934 if (!connectedResourceHandler) { 934 if (!connectedResourceHandler) {
935 registerExtension('__getOpenSockets', 935 registerExtension('ext.dart.io.getOpenSockets',
936 _SocketResourceInfo.getOpenSockets); 936 _SocketResourceInfo.getOpenSockets);
937 registerExtension('__getSocketByID', 937 registerExtension('ext.dart.io.getSocketByID',
938 _SocketResourceInfo.getSocketInfoMapByID); 938 _SocketResourceInfo.getSocketInfoMapByID);
939 939
940 connectedResourceHandler = true; 940 connectedResourceHandler = true;
941 } 941 }
942 } 942 }
943 943
944 void disconnectFromEventHandler() { 944 void disconnectFromEventHandler() {
945 assert(eventPort != null); 945 assert(eventPort != null);
946 eventPort.close(); 946 eventPort.close();
947 eventPort = null; 947 eventPort = null;
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 Datagram _makeDatagram(List<int> data, 1844 Datagram _makeDatagram(List<int> data,
1845 String address, 1845 String address,
1846 List<int> in_addr, 1846 List<int> in_addr,
1847 int port) { 1847 int port) {
1848 return new Datagram( 1848 return new Datagram(
1849 data, 1849 data,
1850 new _InternetAddress(address, null, in_addr), 1850 new _InternetAddress(address, null, in_addr),
1851 port); 1851 port);
1852 } 1852 }
1853 1853
OLDNEW
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | runtime/observatory/tests/service/developer_extension_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698