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

Side by Side Diff: runtime/bin/socket.h

Issue 1916223003: Fixes NetworkInterface.list crash on Android (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/io_natives.cc ('k') | runtime/bin/socket.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 #ifndef BIN_SOCKET_H_ 5 #ifndef BIN_SOCKET_H_
6 #define BIN_SOCKET_H_ 6 #define BIN_SOCKET_H_
7 7
8 #if defined(DART_IO_DISABLED) 8 #if defined(DART_IO_DISABLED)
9 #error "socket.h can only be included on builds with IO enabled" 9 #error "socket.h can only be included on builds with IO enabled"
10 #endif 10 #endif
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 OSError** os_error); 308 OSError** os_error);
309 309
310 static bool ReverseLookup(const RawAddr& addr, 310 static bool ReverseLookup(const RawAddr& addr,
311 char* host, 311 char* host,
312 intptr_t host_len, 312 intptr_t host_len,
313 OSError** os_error); 313 OSError** os_error);
314 314
315 static bool ParseAddress(int type, const char* address, RawAddr* addr); 315 static bool ParseAddress(int type, const char* address, RawAddr* addr);
316 static bool FormatNumericAddress(const RawAddr& addr, char* address, int len); 316 static bool FormatNumericAddress(const RawAddr& addr, char* address, int len);
317 317
318 // Whether ListInterfaces is supported.
319 static bool ListInterfacesSupported();
320
318 // List interfaces. Returns a AddressList of InterfaceSocketAddress's. 321 // List interfaces. Returns a AddressList of InterfaceSocketAddress's.
319 static AddressList<InterfaceSocketAddress>* ListInterfaces( 322 static AddressList<InterfaceSocketAddress>* ListInterfaces(
320 int type, 323 int type,
321 OSError** os_error); 324 OSError** os_error);
322 325
323 static CObject* LookupRequest(const CObjectArray& request); 326 static CObject* LookupRequest(const CObjectArray& request);
324 static CObject* ListInterfacesRequest(const CObjectArray& request); 327 static CObject* ListInterfacesRequest(const CObjectArray& request);
325 static CObject* ReverseLookupRequest(const CObjectArray& request); 328 static CObject* ReverseLookupRequest(const CObjectArray& request);
326 329
327 static Dart_Port GetServicePort(); 330 static Dart_Port GetServicePort();
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 typedef std::map<intptr_t, OSSocket*>::iterator SocketsIterator; 439 typedef std::map<intptr_t, OSSocket*>::iterator SocketsIterator;
437 440
438 private: 441 private:
439 DISALLOW_COPY_AND_ASSIGN(ListeningSocketRegistry); 442 DISALLOW_COPY_AND_ASSIGN(ListeningSocketRegistry);
440 }; 443 };
441 444
442 } // namespace bin 445 } // namespace bin
443 } // namespace dart 446 } // namespace dart
444 447
445 #endif // BIN_SOCKET_H_ 448 #endif // BIN_SOCKET_H_
OLDNEW
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698