 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/mount_node_stream.h | 
| diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node_stream.h b/native_client_sdk/src/libraries/nacl_io/mount_node_stream.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..4f79373f316371d94a44d7a25b00e94b9903bd8a | 
| --- /dev/null | 
| +++ b/native_client_sdk/src/libraries/nacl_io/mount_node_stream.h | 
| @@ -0,0 +1,40 @@ | 
| +// 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_MOUNT_NODE_STREAM_H_ | 
| +#define LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ | 
| + | 
| +#include <map> | 
| +#include <string> | 
| + | 
| +#include "nacl_io/event_emitter_pipe.h" | 
| +#include "nacl_io/mount_node.h" | 
| + | 
| +namespace nacl_io { | 
| + | 
| +class MountNodeStream : public MountNode { | 
| + public: | 
| + explicit MountNodeStream(Mount* mnt); | 
| + | 
| + virtual Error Init(int perm); | 
| + | 
| + virtual EventEmitter* GetEventEmitter() = 0; | 
| 
binji
2013/09/12 01:47:57
Remove, these are identical to MountNode::{GetEven
 
noelallen1
2013/09/12 23:19:03
Done.
 | 
| + virtual Error Read(size_t offs, void *buf, size_t count, int* out_bytes) = 0; | 
| + virtual Error Write(size_t offs, const void *buf, | 
| + size_t count, int* out_bytes) = 0; | 
| + | 
| +protected: | 
| 
binji
2013/09/12 01:47:57
nit: indent 1 space
 
noelallen1
2013/09/12 23:19:03
Done.
 | 
| + Error WaitOnEvent(uint32_t events, int ms); | 
| 
binji
2013/09/12 01:47:57
remove, unimplemented
 
noelallen1
2013/09/12 23:19:03
Done.
 | 
| + | 
| + int read_timeout_; | 
| 
binji
2013/09/12 01:47:57
private?
 
noelallen1
2013/09/12 23:19:03
Derived classes need them, and might modify them.
 | 
| + int write_timeout_; | 
| + | 
| + friend class KernelProxy; | 
| 
binji
2013/09/12 01:47:57
why friends?
 
noelallen1
2013/09/12 23:19:03
Done.
 | 
| + friend class MountStream; | 
| +}; | 
| + | 
| + | 
| +} // namespace nacl_io | 
| + | 
| +#endif // LIBRARIES_NACL_IO_MOUNT_NODE_STREAM_H_ |