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

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

Issue 11773041: Add function for finding what a InputStream or OutputStream is attached to (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/io_natives.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) 2012, 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 10
11 #include "platform/globals.h" 11 #include "platform/globals.h"
(...skipping 19 matching lines...) Expand all
31 }; 31 };
32 32
33 static bool Initialize(); 33 static bool Initialize();
34 static intptr_t Available(intptr_t fd); 34 static intptr_t Available(intptr_t fd);
35 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes); 35 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes);
36 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes); 36 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes);
37 static intptr_t CreateConnect(const char* host, const intptr_t port); 37 static intptr_t CreateConnect(const char* host, const intptr_t port);
38 static intptr_t GetPort(intptr_t fd); 38 static intptr_t GetPort(intptr_t fd);
39 static bool GetRemotePeer(intptr_t fd, char* host, intptr_t* port); 39 static bool GetRemotePeer(intptr_t fd, char* host, intptr_t* port);
40 static void GetError(intptr_t fd, OSError* os_error); 40 static void GetError(intptr_t fd, OSError* os_error);
41 static int GetType(intptr_t fd);
41 static intptr_t GetStdioHandle(int num); 42 static intptr_t GetStdioHandle(int num);
42 43
43 // Perform a IPv4 hostname lookup. Returns the hostname string in 44 // Perform a IPv4 hostname lookup. Returns the hostname string in
44 // IPv4 dotted-decimal format. 45 // IPv4 dotted-decimal format.
45 static const char* LookupIPv4Address(char* host, OSError** os_error); 46 static const char* LookupIPv4Address(char* host, OSError** os_error);
46 47
47 static Dart_Port GetServicePort(); 48 static Dart_Port GetServicePort();
48 49
49 static Dart_Handle SetSocketIdNativeField(Dart_Handle socket, intptr_t id); 50 static Dart_Handle SetSocketIdNativeField(Dart_Handle socket, intptr_t id);
50 static Dart_Handle GetSocketIdNativeField(Dart_Handle socket, intptr_t* id); 51 static Dart_Handle GetSocketIdNativeField(Dart_Handle socket, intptr_t* id);
(...skipping 22 matching lines...) Expand all
73 // -5: invalid bindAddress 74 // -5: invalid bindAddress
74 static intptr_t CreateBindListen(const char* bindAddress, 75 static intptr_t CreateBindListen(const char* bindAddress,
75 intptr_t port, 76 intptr_t port,
76 intptr_t backlog); 77 intptr_t backlog);
77 78
78 DISALLOW_ALLOCATION(); 79 DISALLOW_ALLOCATION();
79 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); 80 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket);
80 }; 81 };
81 82
82 #endif // BIN_SOCKET_H_ 83 #endif // BIN_SOCKET_H_
OLDNEW
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698