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

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

Issue 23498015: [NaCl SDK] Support non blocking TCP/UDP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed issues, UDP ok, dbing TCP Created 7 years, 3 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/mount_node_tcp.h
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h b/native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h
index 860e93bba1f1105a178f277eb6f4023aa9874b93..2963c4a767580a37e39e06b74d768cfc9741107c 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h
+++ b/native_client_sdk/src/libraries/nacl_io/mount_node_tcp.h
@@ -11,6 +11,7 @@
#include <ppapi/c/pp_resource.h>
#include <ppapi/c/ppb_tcp_socket.h>
+#include "nacl_io/event_emitter_tcp.h"
#include "nacl_io/mount_node.h"
#include "nacl_io/mount_node_socket.h"
@@ -20,29 +21,31 @@ class MountNodeTCP : public MountNodeSocket {
public:
explicit MountNodeTCP(Mount* mount);
+ protected:
virtual Error Init(int flags);
+ virtual void Destroy();
+
+ public:
+ virtual EventEmitterTCP* GetEventEmitter();
+
+ virtual void QueueInput();
+ virtual void QueueOutput();
virtual Error Bind(const struct sockaddr* addr, socklen_t len);
virtual Error Connect(const struct sockaddr* addr, socklen_t len);
- virtual Error Recv(void* buf, size_t len, int flags, int* out_len);
- virtual Error RecvFrom(void* buf,
- size_t len,
- int flags,
- struct sockaddr* src_addr,
- socklen_t* addrlen,
- int* out_len);
-
- virtual Error Send(const void* buf, size_t len, int flags, int* out_len);
- virtual Error SendTo(const void* buf,
- size_t len,
- int flags,
- const struct sockaddr* dest_addr,
- socklen_t addrlen,
- int* out_len);
-
protected:
- TCPSocketInterface* TCPSocket();
+ virtual Error Recv_Locked(void* buf,
+ size_t len,
+ PP_Resource* addr,
binji 2013/09/19 22:40:25 out_addr?
noelallen1 2013/09/20 00:51:27 Done.
+ int* out_len);
+
+ virtual Error Send_Locked(const void* buf,
+ size_t len,
+ PP_Resource addr,
+ int* out_len);
+
+ ScopedEventEmitterTCP emitter_;
};

Powered by Google App Engine
This is Rietveld 408576698