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

Unified Diff: native_client_sdk/src/libraries/nacl_io/event_emitter_tcp.h

Issue 26703008: [NaCl SDK] nacl_io: Add support for non-blocking connect/accept (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
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
index 99a559aeb6ee6122b93d5afdd9325d7acb25a554..2b40e29a841cec5917e0cd3677feb67444c98a4b 100644
--- a/native_client_sdk/src/libraries/nacl_io/event_emitter_tcp.h
+++ b/native_client_sdk/src/libraries/nacl_io/event_emitter_tcp.h
@@ -8,12 +8,17 @@
#include "nacl_io/event_emitter_stream.h"
#include "nacl_io/fifo_char.h"
+#include <ppapi/c/pp_resource.h>
+
#include "sdk_util/macros.h"
#include "sdk_util/scoped_ref.h"
+
namespace nacl_io {
class EventEmitterTCP;
+class MountNode;
+
typedef sdk_util::ScopedRef<EventEmitterTCP> ScopedEventEmitterTCP;
class EventEmitterTCP : public EventEmitterStream {
@@ -26,12 +31,18 @@ class EventEmitterTCP : public EventEmitterStream {
uint32_t ReadOut_Locked(char* buffer, uint32_t len);
uint32_t WriteOut_Locked(const char* buffer, uint32_t len);
+ void ConnectDone_Locked();
+ PP_Resource GetAcceptedSocket_Locked();
+ void SetAcceptedSocket_Locked(PP_Resource socket);
+
+ protected:
virtual FIFOChar* in_fifo() { return &in_fifo_; }
noelallen1 2013/10/12 00:13:29 same
virtual FIFOChar* out_fifo() { return &out_fifo_; }
-protected:
+ private:
FIFOChar in_fifo_;
FIFOChar out_fifo_;
+ PP_Resource accepted_socket_;
DISALLOW_COPY_AND_ASSIGN(EventEmitterTCP);
};

Powered by Google App Engine
This is Rietveld 408576698