 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_tcp.h | 
| diff --git a/native_client_sdk/src/libraries/nacl_io/event_emitter_tcp.h b/native_client_sdk/src/libraries/nacl_io/event_emitter_tcp.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..8bf4e29b3b261f20b536889ccb16abf4fb711b5d | 
| --- /dev/null | 
| +++ b/native_client_sdk/src/libraries/nacl_io/event_emitter_tcp.h | 
| @@ -0,0 +1,42 @@ | 
| +// 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_TCP_H_ | 
| +#define LIBRARIES_NACL_IO_EVENT_EMITTER_TCP_H_ | 
| + | 
| +#include "nacl_io/event_emitter_stream.h" | 
| +#include "nacl_io/fifo_char.h" | 
| + | 
| +#include "sdk_util/macros.h" | 
| +#include "sdk_util/scoped_ref.h" | 
| + | 
| +namespace nacl_io { | 
| + | 
| +class EventEmitterTCP; | 
| +typedef sdk_util::ScopedRef<EventEmitterTCP> ScopedEventEmitterTCP; | 
| + | 
| +class EventEmitterTCP : public EventEmitterStream { | 
| + public: | 
| + EventEmitterTCP(size_t rsize, size_t wsize); | 
| + ~EventEmitterTCP(); | 
| 
binji
2013/09/15 22:18:58
this destructor not defined.
 
noelallen1
2013/09/17 21:21:54
Done.
 | 
| + | 
| + uint32_t ReadRXBytes_Locked(char* buffer, uint32_t len); | 
| 
binji
2013/09/15 22:18:58
Bytes is superfluous. Maybe just Read(*)_Locked/Wr
 | 
| + uint32_t WriteRXBytes_Locked(const char* buffer, uint32_t len); | 
| + | 
| + uint32_t ReadTXBytes_Locked(char* buffer, uint32_t len); | 
| + uint32_t WriteTXBytes_Locked(const char* buffer, uint32_t len); | 
| + | 
| + virtual FIFOInterface* rx_fifo() { return &rx_fifo_; } | 
| + virtual FIFOInterface* tx_fifo() { return &tx_fifo_; } | 
| + | 
| +protected: | 
| + FIFOChar rx_fifo_; | 
| + FIFOChar tx_fifo_; | 
| + DISALLOW_COPY_AND_ASSIGN(EventEmitterTCP); | 
| +}; | 
| + | 
| +} // namespace nacl_io | 
| + | 
| +#endif // LIBRARIES_NACL_IO_EVENT_EMITTER_TCP_H_ | 
| + |