| Index: runtime/bin/socket.h
|
| diff --git a/runtime/bin/socket.h b/runtime/bin/socket.h
|
| index 4a42d05034ecda5dc44702332c6e0cb7a6a2c85d..5650baf01e092c5e79481d22f9d68432d400374e 100644
|
| --- a/runtime/bin/socket.h
|
| +++ b/runtime/bin/socket.h
|
| @@ -6,11 +6,17 @@
|
| #define BIN_SOCKET_H_
|
|
|
| #include "bin/builtin.h"
|
| +#include "bin/utils.h"
|
| #include "platform/globals.h"
|
| +#include "platform/thread.h"
|
|
|
|
|
| class Socket {
|
| public:
|
| + enum SocketRequest {
|
| + kLookupRequest = 0,
|
| + };
|
| +
|
| static bool Initialize();
|
| static intptr_t Available(intptr_t fd);
|
| static int Read(intptr_t fd, void* buffer, intptr_t num_bytes);
|
| @@ -19,6 +25,18 @@ class Socket {
|
| static intptr_t GetPort(intptr_t fd);
|
| static intptr_t GetStdioHandle(int num);
|
|
|
| + // Perform a IPv4 hostname lookup. Returns the hostname string in
|
| + // IPv4 dotted-decimal format.
|
| + static const char* LookupIPv4Address(char* host, OSError** os_error);
|
| +
|
| + static Dart_Port GetServicePort();
|
| +
|
| + private:
|
| + static dart::Mutex mutex_;
|
| + static int service_ports_size_;
|
| + static Dart_Port* service_ports_;
|
| + static int service_ports_index_;
|
| +
|
| DISALLOW_ALLOCATION();
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(Socket);
|
| };
|
|
|