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 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_SOCKET_H_ | 5 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_SOCKET_H_ |
6 #define LIBRARIES_NACL_IO_MOUNT_NODE_SOCKET_H_ | 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_SOCKET_H_ |
7 | 7 |
8 #include "nacl_io/ossocket.h" | 8 #include "nacl_io/ossocket.h" |
9 #ifdef PROVIDES_SOCKET_API | 9 #ifdef PROVIDES_SOCKET_API |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 virtual Error Init(int flags) = 0; | 34 virtual Error Init(int flags) = 0; |
35 | 35 |
36 public: | 36 public: |
37 // Normal read/write operations on a file (recv/send). | 37 // Normal read/write operations on a file (recv/send). |
38 virtual Error Read(size_t offs, void* buf, size_t count, int* out_bytes); | 38 virtual Error Read(size_t offs, void* buf, size_t count, int* out_bytes); |
39 virtual Error Write(size_t offs, | 39 virtual Error Write(size_t offs, |
40 const void* buf, | 40 const void* buf, |
41 size_t count, | 41 size_t count, |
42 int* out_bytes); | 42 int* out_bytes); |
43 | 43 |
44 // Unsuported Functions | |
45 virtual Error Accept(const struct sockaddr* addr, socklen_t len); | |
46 virtual Error Listen(int backlog); | |
47 virtual Error GetSockOpt(int lvl, int optname, void* optval, socklen_t* len); | 44 virtual Error GetSockOpt(int lvl, int optname, void* optval, socklen_t* len); |
48 virtual Error SetSockOpt(int lvl, | 45 virtual Error SetSockOpt(int lvl, |
49 int optname, | 46 int optname, |
50 const void* optval, | 47 const void* optval, |
51 socklen_t len); | 48 socklen_t len); |
| 49 |
| 50 // Unsupported Functions |
| 51 virtual Error Accept(const struct sockaddr* addr, socklen_t len); |
| 52 virtual Error Listen(int backlog); |
52 virtual Error Shutdown(int how); | 53 virtual Error Shutdown(int how); |
53 virtual Error MMap(void* addr, | 54 virtual Error MMap(void* addr, |
54 size_t length, | 55 size_t length, |
55 int prot, | 56 int prot, |
56 int flags, | 57 int flags, |
57 size_t offset, | 58 size_t offset, |
58 void** out_addr); | 59 void** out_addr); |
59 | 60 |
60 // Socket Functions. | 61 // Socket Functions. |
61 virtual Error Bind(const struct sockaddr* addr, socklen_t len); | 62 virtual Error Bind(const struct sockaddr* addr, socklen_t len); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 134 |
134 friend class KernelProxy; | 135 friend class KernelProxy; |
135 friend class MountStream; | 136 friend class MountStream; |
136 }; | 137 }; |
137 | 138 |
138 | 139 |
139 } // namespace nacl_io | 140 } // namespace nacl_io |
140 | 141 |
141 | 142 |
142 #endif // PROVIDES_SOCKET_API | 143 #endif // PROVIDES_SOCKET_API |
143 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_SOCKET_H_ | 144 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_SOCKET_H_ |
OLD | NEW |