| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 IPC_IPC_CHANNEL_POSIX_H_ | 5 #ifndef IPC_IPC_CHANNEL_POSIX_H_ |
| 6 #define IPC_IPC_CHANNEL_POSIX_H_ | 6 #define IPC_IPC_CHANNEL_POSIX_H_ |
| 7 | 7 |
| 8 #include "ipc/ipc_channel.h" | 8 #include "ipc/ipc_channel.h" |
| 9 | 9 |
| 10 #include <sys/socket.h> // for CMSG macros | 10 #include <sys/socket.h> // for CMSG macros |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // unused otherwise. | 76 // unused otherwise. |
| 77 int server_listen_pipe_; | 77 int server_listen_pipe_; |
| 78 | 78 |
| 79 // The pipe used for communication. | 79 // The pipe used for communication. |
| 80 int pipe_; | 80 int pipe_; |
| 81 | 81 |
| 82 // For a server, the client end of our socketpair() -- the other end of our | 82 // For a server, the client end of our socketpair() -- the other end of our |
| 83 // pipe_ that is passed to the client. | 83 // pipe_ that is passed to the client. |
| 84 int client_pipe_; | 84 int client_pipe_; |
| 85 | 85 |
| 86 #if defined(OS_LINUX) |
| 87 // Linux uses a dedicated socketpair() for passing file descriptors. |
| 88 int fd_pipe_; |
| 89 int remote_fd_pipe_; |
| 90 #endif |
| 91 |
| 86 // The "name" of our pipe. On Windows this is the global identifier for | 92 // The "name" of our pipe. On Windows this is the global identifier for |
| 87 // the pipe. On POSIX it's used as a key in a local map of file descriptors. | 93 // the pipe. On POSIX it's used as a key in a local map of file descriptors. |
| 88 std::string pipe_name_; | 94 std::string pipe_name_; |
| 89 | 95 |
| 90 Listener* listener_; | 96 Listener* listener_; |
| 91 | 97 |
| 92 // Messages to be sent are queued here. | 98 // Messages to be sent are queued here. |
| 93 std::queue<Message*> output_queue_; | 99 std::queue<Message*> output_queue_; |
| 94 | 100 |
| 95 // We read from the pipe into this buffer | 101 // We read from the pipe into this buffer |
| (...skipping 30 matching lines...) Expand all Loading... |
| 126 bool processing_incoming_; | 132 bool processing_incoming_; |
| 127 | 133 |
| 128 ScopedRunnableMethodFactory<ChannelImpl> factory_; | 134 ScopedRunnableMethodFactory<ChannelImpl> factory_; |
| 129 | 135 |
| 130 DISALLOW_COPY_AND_ASSIGN(ChannelImpl); | 136 DISALLOW_COPY_AND_ASSIGN(ChannelImpl); |
| 131 }; | 137 }; |
| 132 | 138 |
| 133 } // namespace IPC | 139 } // namespace IPC |
| 134 | 140 |
| 135 #endif // IPC_IPC_CHANNEL_POSIX_H_ | 141 #endif // IPC_IPC_CHANNEL_POSIX_H_ |
| OLD | NEW |