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

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

Issue 10919062: Fix type for container of inet_addr result on Win. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 #include "bin/builtin.h" 5 #include "bin/builtin.h"
6 #include "bin/eventhandler.h" 6 #include "bin/eventhandler.h"
7 #include "bin/socket.h" 7 #include "bin/socket.h"
8 8
9 bool Socket::Initialize() { 9 bool Socket::Initialize() {
10 int err; 10 int err;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 free(buffer); 204 free(buffer);
205 return NULL; 205 return NULL;
206 } 206 }
207 return buffer; 207 return buffer;
208 } 208 }
209 209
210 210
211 intptr_t ServerSocket::CreateBindListen(const char* host, 211 intptr_t ServerSocket::CreateBindListen(const char* host,
212 intptr_t port, 212 intptr_t port,
213 intptr_t backlog) { 213 intptr_t backlog) {
214 in_addr_t s_addr = TEMP_FAILURE_RETRY(inet_addr(host)); 214 unsigned long s_addr = TEMP_FAILURE_RETRY(inet_addr(host)); // NOLINT
215 if (s_addr == INADDR_NONE) { 215 if (s_addr == INADDR_NONE) {
216 return -5; 216 return -5;
217 } 217 }
218 218
219 SOCKET s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); 219 SOCKET s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
220 if (s == INVALID_SOCKET) { 220 if (s == INVALID_SOCKET) {
221 return -1; 221 return -1;
222 } 222 }
223 223
224 BOOL optval = true; 224 BOOL optval = true;
(...skipping 28 matching lines...) Expand all
253 if (status == SOCKET_ERROR) { 253 if (status == SOCKET_ERROR) {
254 DWORD rc = WSAGetLastError(); 254 DWORD rc = WSAGetLastError();
255 closesocket(s); 255 closesocket(s);
256 SetLastError(rc); 256 SetLastError(rc);
257 return -1; 257 return -1;
258 } 258 }
259 259
260 ListenSocket* listen_socket = new ListenSocket(s); 260 ListenSocket* listen_socket = new ListenSocket(s);
261 return reinterpret_cast<intptr_t>(listen_socket); 261 return reinterpret_cast<intptr_t>(listen_socket);
262 } 262 }
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