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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/socket/socket_node.cc

Issue 875543002: Grab a bunch of owners / todos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "nacl_io/socket/socket_node.h" 5 #include "nacl_io/socket/socket_node.h"
6 6
7 #include "nacl_io/ossocket.h" 7 #include "nacl_io/ossocket.h"
8 #ifdef PROVIDES_SOCKET_API 8 #ifdef PROVIDES_SOCKET_API
9 9
10 #include <errno.h> 10 #include <errno.h>
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 if (TestStreamFlags(SSF_RECV_ENDOFSTREAM)) { 358 if (TestStreamFlags(SSF_RECV_ENDOFSTREAM)) {
359 *out_len = 0; 359 *out_len = 0;
360 return 0; 360 return 0;
361 } 361 }
362 362
363 int ms = read_timeout_; 363 int ms = read_timeout_;
364 if ((flags & MSG_DONTWAIT) || !attr.IsBlocking()) 364 if ((flags & MSG_DONTWAIT) || !attr.IsBlocking())
365 ms = 0; 365 ms = 0;
366 366
367 // TODO(noelallen) BUG=295177 367 // TODO(bradnelson) BUG=295177
368 // For UDP we should support filtering packets when using connect 368 // For UDP we should support filtering packets when using connect
369 EventListenerLock wait(GetEventEmitter()); 369 EventListenerLock wait(GetEventEmitter());
370 Error err = wait.WaitOnEvent(POLLIN, ms); 370 Error err = wait.WaitOnEvent(POLLIN, ms);
371 371
372 // Timeout is treated as a would block for sockets. 372 // Timeout is treated as a would block for sockets.
373 if (ETIMEDOUT == err) 373 if (ETIMEDOUT == err)
374 return EWOULDBLOCK; 374 return EWOULDBLOCK;
375 375
376 if (err) 376 if (err)
377 return err; 377 return err;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 return 0; 480 return 0;
481 } 481 }
482 482
483 *len = ResourceToSockAddr(local_addr_, *len, addr); 483 *len = ResourceToSockAddr(local_addr_, *len, addr);
484 return 0; 484 return 0;
485 } 485 }
486 486
487 } // namespace nacl_io 487 } // namespace nacl_io
488 488
489 #endif // PROVIDES_SOCKET_API 489 #endif // PROVIDES_SOCKET_API
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/node.h ('k') | native_client_sdk/src/tests/nacl_io_test/event_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698