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

Unified Diff: runtime/bin/socket.h

Issue 76383002: Update InternetAddress (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review commetns Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket.h
diff --git a/runtime/bin/socket.h b/runtime/bin/socket.h
index ce94c5eb0ec141a36e95a450b69761274c18312f..3e5c40c153cc08815b564ede373410e85cd8ef1d 100644
--- a/runtime/bin/socket.h
+++ b/runtime/bin/socket.h
@@ -92,6 +92,14 @@ class SocketAddress {
}
}
+ static Dart_Handle ToTypedData(RawAddr* addr) {
+ int len = GetAddrLength(addr);
+ Dart_Handle result = Dart_NewTypedData(Dart_TypedData_kUint8, len);
+ if (Dart_IsError(result)) Dart_PropagateError(result);
+ Dart_ListSetAsBytes(result, 0, reinterpret_cast<uint8_t *>(addr), len);
+ return result;
+ }
+
private:
char as_string_[INET6_ADDRSTRLEN];
RawAddr addr_;
@@ -181,6 +189,8 @@ class Socket {
intptr_t host_len,
OSError** os_error);
+ static bool ParseAddress(int type, const char* address, RawAddr* addr);
+
// List interfaces. Returns a AddressList of InterfaceSocketAddress's.
static AddressList<InterfaceSocketAddress>* ListInterfaces(
int type,
« 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