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

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

Issue 10014037: Fix win32 Socket test errors (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « no previous file | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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
10 #include "platform/globals.h" 11 #include "platform/globals.h"
11 #include "platform/thread.h" 12 #include "platform/thread.h"
13 // Declare the OS-specific types ahead of defining the generic class.
14 #if defined(TARGET_OS_LINUX)
15 #include "bin/socket_linux.h"
16 #elif defined(TARGET_OS_MACOS)
17 #include "bin/socket_macos.h"
18 #elif defined(TARGET_OS_WINDOWS)
19 #include "bin/socket_win.h"
20 #else
21 #error Unknown target os.
22 #endif
12 23
13 #define DART_INET_ADDRSTRLEN 16
14 24
15 class Socket { 25 class Socket {
16 public: 26 public:
17 enum SocketRequest { 27 enum SocketRequest {
18 kLookupRequest = 0, 28 kLookupRequest = 0,
19 }; 29 };
20 30
21 static bool Initialize(); 31 static bool Initialize();
22 static intptr_t Available(intptr_t fd); 32 static intptr_t Available(intptr_t fd);
23 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes); 33 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes);
(...skipping 28 matching lines...) Expand all
52 static intptr_t Accept(intptr_t fd); 62 static intptr_t Accept(intptr_t fd);
53 static intptr_t CreateBindListen(const char* bindAddress, 63 static intptr_t CreateBindListen(const char* bindAddress,
54 intptr_t port, 64 intptr_t port,
55 intptr_t backlog); 65 intptr_t backlog);
56 66
57 DISALLOW_ALLOCATION(); 67 DISALLOW_ALLOCATION();
58 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); 68 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket);
59 }; 69 };
60 70
61 #endif // BIN_SOCKET_H_ 71 #endif // BIN_SOCKET_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698