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 | 146 ~Channel() override; |
147 virtual ~Channel(); | |
148 | 147 |
149 // Connect the pipe. On the server side, this will initiate | 148 // Connect the pipe. On the server side, this will initiate |
150 // waiting for connections. On the client, it attempts to | 149 // waiting for connections. On the client, it attempts to |
151 // connect to a pre-existing pipe. Note, calling Connect() | 150 // connect to a pre-existing pipe. Note, calling Connect() |
152 // will not block the calling thread and may complete | 151 // will not block the calling thread and may complete |
153 // asynchronously. | 152 // asynchronously. |
154 virtual bool Connect() WARN_UNUSED_RESULT = 0; | 153 virtual bool Connect() WARN_UNUSED_RESULT = 0; |
155 | 154 |
156 // Close this Channel explicitly. May be called multiple times. | 155 // Close this Channel explicitly. May be called multiple times. |
157 // On POSIX calling close on an IPC channel that listens for connections will | 156 // 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... |
227 | 226 |
228 #if defined(OS_POSIX) | 227 #if defined(OS_POSIX) |
229 // SocketPair() creates a pair of socket FDs suitable for using with | 228 // SocketPair() creates a pair of socket FDs suitable for using with |
230 // IPC::Channel. | 229 // IPC::Channel. |
231 IPC_EXPORT bool SocketPair(int* fd1, int* fd2); | 230 IPC_EXPORT bool SocketPair(int* fd1, int* fd2); |
232 #endif | 231 #endif |
233 | 232 |
234 } // namespace IPC | 233 } // namespace IPC |
235 | 234 |
236 #endif // IPC_IPC_CHANNEL_H_ | 235 #endif // IPC_IPC_CHANNEL_H_ |
OLD | NEW |