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

Side by Side Diff: runtime/bin/socket_win.cc

Issue 95183002: Add the index information to network interface (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years 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_patch.dart ('k') | sdk/lib/io/socket.dart » ('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 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/eventhandler.h" 9 #include "bin/eventhandler.h"
10 #include "bin/file.h" 10 #include "bin/file.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 322 }
323 } 323 }
324 AddressList<InterfaceSocketAddress>* addresses = 324 AddressList<InterfaceSocketAddress>* addresses =
325 new AddressList<InterfaceSocketAddress>(count); 325 new AddressList<InterfaceSocketAddress>(count);
326 intptr_t i = 0; 326 intptr_t i = 0;
327 for (IP_ADAPTER_ADDRESSES* a = addrs; a != NULL; a = a->Next) { 327 for (IP_ADAPTER_ADDRESSES* a = addrs; a != NULL; a = a->Next) {
328 for (IP_ADAPTER_UNICAST_ADDRESS* u = a->FirstUnicastAddress; 328 for (IP_ADAPTER_UNICAST_ADDRESS* u = a->FirstUnicastAddress;
329 u != NULL; u = u->Next) { 329 u != NULL; u = u->Next) {
330 addresses->SetAt(i, new InterfaceSocketAddress( 330 addresses->SetAt(i, new InterfaceSocketAddress(
331 u->Address.lpSockaddr, 331 u->Address.lpSockaddr,
332 StringUtils::WideToUtf8(a->FriendlyName))); 332 StringUtils::WideToUtf8(a->FriendlyName),
333 a->Ipv6IfIndex));
333 i++; 334 i++;
334 } 335 }
335 } 336 }
336 free(addrs); 337 free(addrs);
337 return addresses; 338 return addresses;
338 } 339 }
339 340
340 341
341 intptr_t ServerSocket::CreateBindListen(RawAddr addr, 342 intptr_t ServerSocket::CreateBindListen(RawAddr addr,
342 intptr_t port, 343 intptr_t port,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 IPPROTO_TCP, 444 IPPROTO_TCP,
444 TCP_NODELAY, 445 TCP_NODELAY,
445 reinterpret_cast<char *>(&on), 446 reinterpret_cast<char *>(&on),
446 sizeof(on)) == 0; 447 sizeof(on)) == 0;
447 } 448 }
448 449
449 } // namespace bin 450 } // namespace bin
450 } // namespace dart 451 } // namespace dart
451 452
452 #endif // defined(TARGET_OS_WINDOWS) 453 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | sdk/lib/io/socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698