| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "nacl_io/ossocket.h" | 5 #include "nacl_io/ossocket.h" |
| 6 #ifdef PROVIDES_SOCKET_API | 6 #ifdef PROVIDES_SOCKET_API |
| 7 | 7 |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 void MountNodeSocket::Destroy() { | 28 void MountNodeSocket::Destroy() { |
| 29 if (socket_resource_) | 29 if (socket_resource_) |
| 30 mount_->ppapi()->ReleaseResource(socket_resource_); | 30 mount_->ppapi()->ReleaseResource(socket_resource_); |
| 31 if (local_addr_) | 31 if (local_addr_) |
| 32 mount_->ppapi()->ReleaseResource(local_addr_); | 32 mount_->ppapi()->ReleaseResource(local_addr_); |
| 33 if (remote_addr_) | 33 if (remote_addr_) |
| 34 mount_->ppapi()->ReleaseResource(remote_addr_); | 34 mount_->ppapi()->ReleaseResource(remote_addr_); |
| 35 } | 35 } |
| 36 | 36 |
| 37 // Default to always signaled, until socket select support is added. | |
| 38 uint32_t MountNodeSocket::GetEventStatus() { | |
| 39 return POLLIN | POLLOUT; | |
| 40 } | |
| 41 | |
| 42 // Assume that |addr| and |out_addr| are non-NULL. | 37 // Assume that |addr| and |out_addr| are non-NULL. |
| 43 Error MountNodeSocket::MMap(void* addr, | 38 Error MountNodeSocket::MMap(void* addr, |
| 44 size_t length, | 39 size_t length, |
| 45 int prot, | 40 int prot, |
| 46 int flags, | 41 int flags, |
| 47 size_t offset, | 42 size_t offset, |
| 48 void** out_addr) { | 43 void** out_addr) { |
| 49 return EACCES; | 44 return EACCES; |
| 50 } | 45 } |
| 51 | 46 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 return 0; | 249 return 0; |
| 255 } | 250 } |
| 256 | 251 |
| 257 return ENOTCONN; | 252 return ENOTCONN; |
| 258 } | 253 } |
| 259 | 254 |
| 260 | 255 |
| 261 } // namespace nacl_io | 256 } // namespace nacl_io |
| 262 | 257 |
| 263 #endif // PROVIDES_SOCKET_API | 258 #endif // PROVIDES_SOCKET_API |
| OLD | NEW |