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

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

Issue 24395013: Merge services into a shared IOService in dart:io, and use a native port. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Finish off native_service Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/secure_socket_patch.dart ('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 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/utils.h" 9 #include "bin/utils.h"
10 #include "bin/dartutils.h"
10 11
11 #include "platform/globals.h" 12 #include "platform/globals.h"
12 #include "platform/thread.h" 13 #include "platform/thread.h"
13 // Declare the OS-specific types ahead of defining the generic class. 14 // Declare the OS-specific types ahead of defining the generic class.
14 #if defined(TARGET_OS_ANDROID) 15 #if defined(TARGET_OS_ANDROID)
15 #include "bin/socket_android.h" 16 #include "bin/socket_android.h"
16 #elif defined(TARGET_OS_LINUX) 17 #elif defined(TARGET_OS_LINUX)
17 #include "bin/socket_linux.h" 18 #include "bin/socket_linux.h"
18 #elif defined(TARGET_OS_MACOS) 19 #elif defined(TARGET_OS_MACOS)
19 #include "bin/socket_macos.h" 20 #include "bin/socket_macos.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 static bool ReverseLookup(RawAddr addr, 179 static bool ReverseLookup(RawAddr addr,
179 char* host, 180 char* host,
180 intptr_t host_len, 181 intptr_t host_len,
181 OSError** os_error); 182 OSError** os_error);
182 183
183 // List interfaces. Returns a AddressList of InterfaceSocketAddress's. 184 // List interfaces. Returns a AddressList of InterfaceSocketAddress's.
184 static AddressList<InterfaceSocketAddress>* ListInterfaces( 185 static AddressList<InterfaceSocketAddress>* ListInterfaces(
185 int type, 186 int type,
186 OSError** os_error); 187 OSError** os_error);
187 188
189 static CObject* LookupRequest(const CObjectArray& request);
190 static CObject* ListInterfacesRequest(const CObjectArray& request);
191 static CObject* ReverseLookupRequest(const CObjectArray& request);
192
188 static Dart_Port GetServicePort(); 193 static Dart_Port GetServicePort();
189 194
190 static Dart_Handle SetSocketIdNativeField(Dart_Handle socket, intptr_t id); 195 static Dart_Handle SetSocketIdNativeField(Dart_Handle socket, intptr_t id);
191 static Dart_Handle GetSocketIdNativeField(Dart_Handle socket, intptr_t* id); 196 static Dart_Handle GetSocketIdNativeField(Dart_Handle socket, intptr_t* id);
192 197
193 private: 198 private:
194 static dart::Mutex* mutex_; 199 static dart::Mutex* mutex_;
195 static int service_ports_size_; 200 static int service_ports_size_;
196 static Dart_Port* service_ports_; 201 static Dart_Port* service_ports_;
197 static int service_ports_index_; 202 static int service_ports_index_;
(...skipping 21 matching lines...) Expand all
219 224
220 private: 225 private:
221 DISALLOW_ALLOCATION(); 226 DISALLOW_ALLOCATION();
222 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); 227 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket);
223 }; 228 };
224 229
225 } // namespace bin 230 } // namespace bin
226 } // namespace dart 231 } // namespace dart
227 232
228 #endif // BIN_SOCKET_H_ 233 #endif // BIN_SOCKET_H_
OLDNEW
« no previous file with comments | « runtime/bin/secure_socket_patch.dart ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698