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

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

Issue 8574002: Handle stdin/stdout/stderr on Windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments from ager@ Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process_win.cc ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/globals.h" 9 #include "bin/globals.h"
10 10
11 11
12 class Socket { 12 class Socket {
13 public: 13 public:
14 static bool Initialize(); 14 static bool Initialize();
15 static intptr_t Available(intptr_t fd); 15 static intptr_t Available(intptr_t fd);
16 static intptr_t Read(intptr_t fd, void* buffer, intptr_t num_bytes); 16 static intptr_t Read(intptr_t fd, void* buffer, intptr_t num_bytes);
17 static intptr_t Write(intptr_t fd, const void* buffer, intptr_t num_bytes); 17 static intptr_t Write(intptr_t fd, const void* buffer, intptr_t num_bytes);
18 static intptr_t CreateConnect(const char* host, const intptr_t port); 18 static intptr_t CreateConnect(const char* host, const intptr_t port);
19 static intptr_t GetPort(intptr_t fd); 19 static intptr_t GetPort(intptr_t fd);
20 static intptr_t GetStdioHandle(int num);
20 21
21 DISALLOW_ALLOCATION(); 22 DISALLOW_ALLOCATION();
22 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket); 23 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket);
23 }; 24 };
24 25
25 26
26 class ServerSocket { 27 class ServerSocket {
27 public: 28 public:
28 static intptr_t Accept(intptr_t fd); 29 static intptr_t Accept(intptr_t fd);
29 static intptr_t CreateBindListen(const char* bindAddress, 30 static intptr_t CreateBindListen(const char* bindAddress,
30 intptr_t port, 31 intptr_t port,
31 intptr_t backlog); 32 intptr_t backlog);
32 33
33 DISALLOW_ALLOCATION(); 34 DISALLOW_ALLOCATION();
34 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); 35 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket);
35 }; 36 };
36 37
37 #endif // BIN_SOCKET_H_ 38 #endif // BIN_SOCKET_H_
OLDNEW
« no previous file with comments | « runtime/bin/process_win.cc ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698