OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef IPC_IPC_CHANNEL_H_ |
6 #define IPC_IPC_CHANNEL_H_ | 6 #define IPC_IPC_CHANNEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 #if defined(OS_POSIX) | 136 #if defined(OS_POSIX) |
137 // An "open" named server accepts connections from ANY client. | 137 // An "open" named server accepts connections from ANY client. |
138 // The caller must then implement their own access-control based on the | 138 // The caller must then implement their own access-control based on the |
139 // client process' user Id. | 139 // client process' user Id. |
140 static scoped_ptr<Channel> CreateOpenNamedServer( | 140 static scoped_ptr<Channel> CreateOpenNamedServer( |
141 const IPC::ChannelHandle &channel_handle, Listener* listener); | 141 const IPC::ChannelHandle &channel_handle, Listener* listener); |
142 #endif | 142 #endif |
143 static scoped_ptr<Channel> CreateServer( | 143 static scoped_ptr<Channel> CreateServer( |
144 const IPC::ChannelHandle &channel_handle, Listener* listener); | 144 const IPC::ChannelHandle &channel_handle, Listener* listener); |
145 | 145 |
146 ~Channel() override; | 146 |
| 147 virtual ~Channel(); |
147 | 148 |
148 // Connect the pipe. On the server side, this will initiate | 149 // Connect the pipe. On the server side, this will initiate |
149 // waiting for connections. On the client, it attempts to | 150 // waiting for connections. On the client, it attempts to |
150 // connect to a pre-existing pipe. Note, calling Connect() | 151 // connect to a pre-existing pipe. Note, calling Connect() |
151 // will not block the calling thread and may complete | 152 // will not block the calling thread and may complete |
152 // asynchronously. | 153 // asynchronously. |
153 virtual bool Connect() WARN_UNUSED_RESULT = 0; | 154 virtual bool Connect() WARN_UNUSED_RESULT = 0; |
154 | 155 |
155 // Close this Channel explicitly. May be called multiple times. | 156 // Close this Channel explicitly. May be called multiple times. |
156 // On POSIX calling close on an IPC channel that listens for connections will | 157 // On POSIX calling close on an IPC channel that listens for connections will |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 227 |
227 #if defined(OS_POSIX) | 228 #if defined(OS_POSIX) |
228 // SocketPair() creates a pair of socket FDs suitable for using with | 229 // SocketPair() creates a pair of socket FDs suitable for using with |
229 // IPC::Channel. | 230 // IPC::Channel. |
230 IPC_EXPORT bool SocketPair(int* fd1, int* fd2); | 231 IPC_EXPORT bool SocketPair(int* fd1, int* fd2); |
231 #endif | 232 #endif |
232 | 233 |
233 } // namespace IPC | 234 } // namespace IPC |
234 | 235 |
235 #endif // IPC_IPC_CHANNEL_H_ | 236 #endif // IPC_IPC_CHANNEL_H_ |
OLD | NEW |