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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/socket/unix_node.h

Issue 1679643002: nacl_io: Add SOCK_DGRAM support to socketpair() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review feedback Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SOCKET_UNIX_NODE_H_ 5 #ifndef LIBRARIES_NACL_IO_SOCKET_UNIX_NODE_H_
6 #define LIBRARIES_NACL_IO_SOCKET_UNIX_NODE_H_ 6 #define LIBRARIES_NACL_IO_SOCKET_UNIX_NODE_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
11 #include "nacl_io/node.h" 11 #include "nacl_io/node.h"
12 #include "nacl_io/socket/socket_node.h" 12 #include "nacl_io/socket/socket_node.h"
13 #include "nacl_io/socket/unix_event_emitter.h" 13 #include "nacl_io/socket/unix_event_emitter.h"
14 14
15 namespace nacl_io { 15 namespace nacl_io {
16 16
17 class UnixNode : public SocketNode { 17 class UnixNode : public SocketNode {
18 public: 18 public:
19 explicit UnixNode(Filesystem* filesystem); 19 UnixNode(Filesystem* filesystem, int type);
20 UnixNode(Filesystem* filesystem, const UnixNode& peer); 20 UnixNode(Filesystem* filesystem, const UnixNode& peer);
21 21
22 virtual EventEmitter* GetEventEmitter(); 22 virtual EventEmitter* GetEventEmitter();
23 23
24 protected: 24 protected:
25 virtual Error Recv_Locked(void* buffer, 25 virtual Error Recv_Locked(void* buffer,
26 size_t len, 26 size_t len,
27 PP_Resource* out_addr, 27 PP_Resource* out_addr,
28 int* out_len); 28 int* out_len);
29 virtual Error Send_Locked(const void* buffer, 29 virtual Error Send_Locked(const void* buffer,
(...skipping 21 matching lines...) Expand all
51 int* out_len); 51 int* out_len);
52 52
53 private: 53 private:
54 ScopedUnixEventEmitter emitter_; 54 ScopedUnixEventEmitter emitter_;
55 }; 55 };
56 56
57 } // namespace nacl_io 57 } // namespace nacl_io
58 58
59 #endif // PROVIDES_SOCKET_API 59 #endif // PROVIDES_SOCKET_API
60 #endif // LIBRARIES_NACL_IO_SOCKET_UNIX_NODE_H_ 60 #endif // LIBRARIES_NACL_IO_SOCKET_UNIX_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698