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, |