 Chromium Code Reviews
 Chromium Code Reviews Issue 23498015:
  [NaCl SDK] Support non blocking TCP/UDP  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 23498015:
  [NaCl SDK] Support non blocking TCP/UDP  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| Index: native_client_sdk/src/libraries/nacl_io/event_emitter_tty.h | 
| diff --git a/native_client_sdk/src/libraries/nacl_io/event_emitter_tty.h b/native_client_sdk/src/libraries/nacl_io/event_emitter_tty.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..8ec49b3c6616c61d65da64b7b3c054650de2b634 | 
| --- /dev/null | 
| +++ b/native_client_sdk/src/libraries/nacl_io/event_emitter_tty.h | 
| @@ -0,0 +1,43 @@ | 
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef LIBRARIES_NACL_IO_EVENT_EMITTER_TTY_H_ | 
| +#define LIBRARIES_NACL_IO_EVENT_EMITTER_TTY_H_ | 
| + | 
| +#include <poll.h> | 
| +#include <stdint.h> | 
| +#include <stdlib.h> | 
| + | 
| +#include "nacl_io/event_emitter_stream.h" | 
| +#include "nacl_io/fifo_char.h" | 
| +#include "nacl_io/fifo_null.h" | 
| + | 
| +#include "sdk_util/auto_lock.h" | 
| +#include "sdk_util/macros.h" | 
| + | 
| +namespace nacl_io { | 
| + | 
| +class EventEmitterTTY; | 
| +typedef sdk_util::ScopedRef<EventEmitterTTY> ScopedEventEmitterTTY; | 
| + | 
| +class EventEmitterTTY : public EventEmitterStream { | 
| + public: | 
| + EventEmitterTTY(size_t size); | 
| 
binji
2013/09/15 22:18:58
explicit
 
noelallen1
2013/09/17 21:21:54
Done.
 | 
| + | 
| + size_t Read_Locked(char* data, size_t len); | 
| + size_t Write_Locked(const char* data, size_t len); | 
| + | 
| + virtual FIFOInterface* rx_fifo() { return &fifo_; } | 
| + virtual FIFOInterface* tx_fifo() { return &null_; } | 
| + | 
| + private: | 
| + FIFOChar fifo_; | 
| + FIFONull null_; | 
| + DISALLOW_COPY_AND_ASSIGN(EventEmitterPipe); | 
| 
binji
2013/09/15 22:18:58
EventEmitterTTY
 
noelallen1
2013/09/17 21:21:54
Done.
 | 
| +}; | 
| + | 
| +} // namespace nacl_io | 
| + | 
| +#endif // LIBRARIES_NACL_IO_EVENT_EMITTER_PIPE_H_ | 
| + |