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

Side by Side Diff: runtime/bin/io_natives.cc

Issue 2803543006: Added synchronous socket implementation to dart:io. (Closed)
Patch Set: Small fix for MacOS Created 3 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
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 #include "bin/io_natives.h" 5 #include "bin/io_natives.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "bin/builtin.h" 10 #include "bin/builtin.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 V(Socket_WriteList, 4) \ 144 V(Socket_WriteList, 4) \
145 V(Stdin_ReadByte, 0) \ 145 V(Stdin_ReadByte, 0) \
146 V(Stdin_GetEchoMode, 0) \ 146 V(Stdin_GetEchoMode, 0) \
147 V(Stdin_SetEchoMode, 1) \ 147 V(Stdin_SetEchoMode, 1) \
148 V(Stdin_GetLineMode, 0) \ 148 V(Stdin_GetLineMode, 0) \
149 V(Stdin_SetLineMode, 1) \ 149 V(Stdin_SetLineMode, 1) \
150 V(Stdin_AnsiSupported, 0) \ 150 V(Stdin_AnsiSupported, 0) \
151 V(Stdout_GetTerminalSize, 1) \ 151 V(Stdout_GetTerminalSize, 1) \
152 V(Stdout_AnsiSupported, 1) \ 152 V(Stdout_AnsiSupported, 1) \
153 V(StringToSystemEncoding, 1) \ 153 V(StringToSystemEncoding, 1) \
154 V(SynchronousSocket_Available, 1) \
155 V(SynchronousSocket_CloseSync, 1) \
156 V(SynchronousSocket_CreateConnectSync, 3) \
157 V(SynchronousSocket_GetPort, 1) \
158 V(SynchronousSocket_GetRemotePeer, 1) \
159 V(SynchronousSocket_LookupRequest, 2) \
160 V(SynchronousSocket_ShutdownRead, 1) \
161 V(SynchronousSocket_ShutdownWrite, 1) \
162 V(SynchronousSocket_Read, 2) \
163 V(SynchronousSocket_WriteList, 4) \
154 V(SystemEncodingToString, 1) \ 164 V(SystemEncodingToString, 1) \
155 V(X509_Subject, 1) \ 165 V(X509_Subject, 1) \
156 V(X509_Issuer, 1) \ 166 V(X509_Issuer, 1) \
157 V(X509_StartValidity, 1) \ 167 V(X509_StartValidity, 1) \
158 V(X509_EndValidity, 1) 168 V(X509_EndValidity, 1)
159 169
160 IO_NATIVE_LIST(DECLARE_FUNCTION); 170 IO_NATIVE_LIST(DECLARE_FUNCTION);
161 171
162 static struct NativeEntries { 172 static struct NativeEntries {
163 const char* name_; 173 const char* name_;
(...skipping 29 matching lines...) Expand all
193 struct NativeEntries* entry = &(IOEntries[i]); 203 struct NativeEntries* entry = &(IOEntries[i]);
194 if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) { 204 if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) {
195 return reinterpret_cast<const uint8_t*>(entry->name_); 205 return reinterpret_cast<const uint8_t*>(entry->name_);
196 } 206 }
197 } 207 }
198 return NULL; 208 return NULL;
199 } 209 }
200 210
201 } // namespace bin 211 } // namespace bin
202 } // namespace dart 212 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698