OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ipc/ipc_channel_handle.h" | 10 #include "ipc/ipc_channel_handle.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // |mode| specifies whether this Channel is to operate in server mode or | 112 // |mode| specifies whether this Channel is to operate in server mode or |
113 // client mode. In server mode, the Channel is responsible for setting up the | 113 // client mode. In server mode, the Channel is responsible for setting up the |
114 // IPC object, whereas in client mode, the Channel merely connects to the | 114 // IPC object, whereas in client mode, the Channel merely connects to the |
115 // already established IPC object. | 115 // already established IPC object. |
116 // |listener| receives a callback on the current thread for each newly | 116 // |listener| receives a callback on the current thread for each newly |
117 // received message. | 117 // received message. |
118 // | 118 // |
119 Channel(const IPC::ChannelHandle &channel_handle, Mode mode, | 119 Channel(const IPC::ChannelHandle &channel_handle, Mode mode, |
120 Listener* listener); | 120 Listener* listener); |
121 | 121 |
122 ~Channel(); | 122 virtual ~Channel(); |
123 | 123 |
124 // Connect the pipe. On the server side, this will initiate | 124 // Connect the pipe. On the server side, this will initiate |
125 // waiting for connections. On the client, it attempts to | 125 // waiting for connections. On the client, it attempts to |
126 // connect to a pre-existing pipe. Note, calling Connect() | 126 // connect to a pre-existing pipe. Note, calling Connect() |
127 // will not block the calling thread and may complete | 127 // will not block the calling thread and may complete |
128 // asynchronously. | 128 // asynchronously. |
129 bool Connect() WARN_UNUSED_RESULT; | 129 bool Connect() WARN_UNUSED_RESULT; |
130 | 130 |
131 // Close this Channel explicitly. May be called multiple times. | 131 // Close this Channel explicitly. May be called multiple times. |
132 // On POSIX calling close on an IPC channel that listens for connections will | 132 // On POSIX calling close on an IPC channel that listens for connections will |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16), | 191 HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16), |
192 // to avoid conflicting with normal | 192 // to avoid conflicting with normal |
193 // message types, which are enumeration | 193 // message types, which are enumeration |
194 // constants starting from 0. | 194 // constants starting from 0. |
195 }; | 195 }; |
196 }; | 196 }; |
197 | 197 |
198 } // namespace IPC | 198 } // namespace IPC |
199 | 199 |
200 #endif // IPC_IPC_CHANNEL_H_ | 200 #endif // IPC_IPC_CHANNEL_H_ |
OLD | NEW |