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

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

Issue 2797993005: Re-land socket refactor with fixes for Windows. (Closed)
Patch Set: Rebased + reverted original revert Created 3 years, 8 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
« no previous file with comments | « runtime/bin/socket_macos.cc ('k') | runtime/bin/socket_unsupported.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 5 @patch
6 class RawServerSocket { 6 class RawServerSocket {
7 @patch 7 @patch
8 static Future<RawServerSocket> bind(address, int port, 8 static Future<RawServerSocket> bind(address, int port,
9 {int backlog: 0, bool v6Only: false, bool shared: false}) { 9 {int backlog: 0, bool v6Only: false, bool shared: false}) {
10 return _RawServerSocket.bind(address, port, backlog, v6Only, shared); 10 return _RawServerSocket.bind(address, port, backlog, v6Only, shared);
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 nativeAvailable() native "Socket_Available"; 1057 nativeAvailable() native "Socket_Available";
1058 nativeRead(int len) native "Socket_Read"; 1058 nativeRead(int len) native "Socket_Read";
1059 nativeRecvFrom() native "Socket_RecvFrom"; 1059 nativeRecvFrom() native "Socket_RecvFrom";
1060 nativeWrite(List<int> buffer, int offset, int bytes) 1060 nativeWrite(List<int> buffer, int offset, int bytes)
1061 native "Socket_WriteList"; 1061 native "Socket_WriteList";
1062 nativeSendTo(List<int> buffer, int offset, int bytes, List<int> address, 1062 nativeSendTo(List<int> buffer, int offset, int bytes, List<int> address,
1063 int port) native "Socket_SendTo"; 1063 int port) native "Socket_SendTo";
1064 nativeCreateConnect(List<int> addr, int port) native "Socket_CreateConnect"; 1064 nativeCreateConnect(List<int> addr, int port) native "Socket_CreateConnect";
1065 nativeCreateBindConnect(List<int> addr, int port, List<int> sourceAddr) 1065 nativeCreateBindConnect(List<int> addr, int port, List<int> sourceAddr)
1066 native "Socket_CreateBindConnect"; 1066 native "Socket_CreateBindConnect";
1067 bool isBindError(int errorNumber) native "Socket_IsBindError"; 1067 bool isBindError(int errorNumber) native "SocketBase_IsBindError";
1068 nativeCreateBindListen(List<int> addr, int port, int backlog, bool v6Only, 1068 nativeCreateBindListen(List<int> addr, int port, int backlog, bool v6Only,
1069 bool shared) native "ServerSocket_CreateBindListen"; 1069 bool shared) native "ServerSocket_CreateBindListen";
1070 nativeCreateBindDatagram(List<int> addr, int port, bool reuseAddress) 1070 nativeCreateBindDatagram(List<int> addr, int port, bool reuseAddress)
1071 native "Socket_CreateBindDatagram"; 1071 native "Socket_CreateBindDatagram";
1072 nativeAccept(_NativeSocket socket) native "ServerSocket_Accept"; 1072 nativeAccept(_NativeSocket socket) native "ServerSocket_Accept";
1073 int nativeGetPort() native "Socket_GetPort"; 1073 int nativeGetPort() native "Socket_GetPort";
1074 List nativeGetRemotePeer() native "Socket_GetRemotePeer"; 1074 List nativeGetRemotePeer() native "Socket_GetRemotePeer";
1075 int nativeGetSocketId() native "Socket_GetSocketId"; 1075 int nativeGetSocketId() native "Socket_GetSocketId";
1076 OSError nativeGetError() native "Socket_GetError"; 1076 OSError nativeGetError() native "Socket_GetError";
1077 nativeGetOption(int option, int protocol) native "Socket_GetOption"; 1077 nativeGetOption(int option, int protocol) native "Socket_GetOption";
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 } else { 1803 } else {
1804 _socket.close(); 1804 _socket.close();
1805 } 1805 }
1806 } 1806 }
1807 } 1807 }
1808 1808
1809 Datagram _makeDatagram( 1809 Datagram _makeDatagram(
1810 List<int> data, String address, List<int> in_addr, int port) { 1810 List<int> data, String address, List<int> in_addr, int port) {
1811 return new Datagram(data, new _InternetAddress(address, null, in_addr), port); 1811 return new Datagram(data, new _InternetAddress(address, null, in_addr), port);
1812 } 1812 }
OLDNEW
« no previous file with comments | « runtime/bin/socket_macos.cc ('k') | runtime/bin/socket_unsupported.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698