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_UDP_H_ | 5 #ifndef LIBRARIES_NACL_IO_MOUNT_NODE_UDP_H_ |
6 #define LIBRARIES_NACL_IO_MOUNT_NODE_UDP_H_ | 6 #define LIBRARIES_NACL_IO_MOUNT_NODE_UDP_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 14 matching lines...) Expand all Loading... |
25 virtual Error Init(int open_flags); | 25 virtual Error Init(int open_flags); |
26 virtual void Destroy(); | 26 virtual void Destroy(); |
27 | 27 |
28 public: | 28 public: |
29 virtual EventEmitterUDP* GetEventEmitter(); | 29 virtual EventEmitterUDP* GetEventEmitter(); |
30 | 30 |
31 virtual void QueueInput(); | 31 virtual void QueueInput(); |
32 virtual void QueueOutput(); | 32 virtual void QueueOutput(); |
33 | 33 |
34 virtual Error Bind(const struct sockaddr* addr, socklen_t len); | 34 virtual Error Bind(const struct sockaddr* addr, socklen_t len); |
35 virtual Error Connect(const struct sockaddr* addr, socklen_t len); | 35 virtual Error Connect(const HandleAttr& attr, |
| 36 const struct sockaddr* addr, |
| 37 socklen_t len); |
36 | 38 |
37 protected: | 39 protected: |
38 virtual Error Recv_Locked(void* buf, | 40 virtual Error Recv_Locked(void* buf, |
39 size_t len, | 41 size_t len, |
40 PP_Resource* addr, | 42 PP_Resource* addr, |
41 int* out_len); | 43 int* out_len); |
42 | 44 |
43 virtual Error Send_Locked(const void* buf, | 45 virtual Error Send_Locked(const void* buf, |
44 size_t len, | 46 size_t len, |
45 PP_Resource addr, | 47 PP_Resource addr, |
46 int* out_len); | 48 int* out_len); |
47 | 49 |
48 ScopedEventEmitterUDP emitter_; | 50 ScopedEventEmitterUDP emitter_; |
49 }; | 51 }; |
50 | 52 |
51 | 53 |
52 } // namespace nacl_io | 54 } // namespace nacl_io |
53 | 55 |
54 #endif // PROVIDES_SOCKET_API | 56 #endif // PROVIDES_SOCKET_API |
55 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_UDP_H_ | 57 #endif // LIBRARIES_NACL_IO_MOUNT_NODE_UDP_H_ |
OLD | NEW |