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

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

Issue 9999022: Fix signature of GetRemotePeer declaration. (Closed) Base URL: https://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 | no next file » | 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 #include "platform/globals.h" 10 #include "platform/globals.h"
11 #include "platform/thread.h" 11 #include "platform/thread.h"
12 12
13 #define DART_INET_ADDRSTRLEN 16 13 #define DART_INET_ADDRSTRLEN 16
14 14
15 class Socket { 15 class Socket {
16 public: 16 public:
17 enum SocketRequest { 17 enum SocketRequest {
18 kLookupRequest = 0, 18 kLookupRequest = 0,
19 }; 19 };
20 20
21 static bool Initialize(); 21 static bool Initialize();
22 static intptr_t Available(intptr_t fd); 22 static intptr_t Available(intptr_t fd);
23 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes); 23 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes);
24 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes); 24 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes);
25 static intptr_t CreateConnect(const char* host, const intptr_t port); 25 static intptr_t CreateConnect(const char* host, const intptr_t port);
26 static intptr_t GetPort(intptr_t fd); 26 static intptr_t GetPort(intptr_t fd);
27 static bool GetRemotePeer(intptr_t fd, char *host, int *port); 27 static bool GetRemotePeer(intptr_t fd, char *host, intptr_t *port);
28 static void GetError(intptr_t fd, OSError* os_error); 28 static void GetError(intptr_t fd, OSError* os_error);
29 static intptr_t GetStdioHandle(int num); 29 static intptr_t GetStdioHandle(int num);
30 30
31 // Perform a IPv4 hostname lookup. Returns the hostname string in 31 // Perform a IPv4 hostname lookup. Returns the hostname string in
32 // IPv4 dotted-decimal format. 32 // IPv4 dotted-decimal format.
33 static const char* LookupIPv4Address(char* host, OSError** os_error); 33 static const char* LookupIPv4Address(char* host, OSError** os_error);
34 34
35 static Dart_Port GetServicePort(); 35 static Dart_Port GetServicePort();
36 36
37 private: 37 private:
(...skipping 14 matching lines...) Expand all
52 static intptr_t Accept(intptr_t fd); 52 static intptr_t Accept(intptr_t fd);
53 static intptr_t CreateBindListen(const char* bindAddress, 53 static intptr_t CreateBindListen(const char* bindAddress,
54 intptr_t port, 54 intptr_t port,
55 intptr_t backlog); 55 intptr_t backlog);
56 56
57 DISALLOW_ALLOCATION(); 57 DISALLOW_ALLOCATION();
58 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); 58 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket);
59 }; 59 };
60 60
61 #endif // BIN_SOCKET_H_ 61 #endif // BIN_SOCKET_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698