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

Unified Diff: native_client_sdk/src/libraries/nacl_io/kernel_handle.cc

Issue 22587003: [NaCl SDK] Add UDP and TCP Sockets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 7 years, 4 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/kernel_handle.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc b/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
index d93c05b09991ffe54221d29051795f185d0d939b..37d3fa43b7ff40f1af119aaaa08ca37868550dd3 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc
@@ -29,6 +29,13 @@ KernelHandle::~KernelHandle() {
mount_.reset(NULL);
}
+// Returns the MountNodeSocket* if this node is a socket.
+MountNodeSocket* KernelHandle::socket_node() {
+ if (node_.get() && node_->IsaSock())
+ return reinterpret_cast<MountNodeSocket*>(node_.get());
binji 2013/08/09 23:08:27 static_cast
+ return NULL;
+}
+
Error KernelHandle::Init(int open_mode) {
if (open_mode & O_APPEND) {
Error error = node_->GetSize(&offs_);
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_handle.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698