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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 MODE_OPEN_NAMED_SERVER = MODE_OPEN_ACCESS_FLAG | MODE_SERVER_FLAG | | 73 MODE_OPEN_NAMED_SERVER = MODE_OPEN_ACCESS_FLAG | MODE_SERVER_FLAG | |
74 MODE_NAMED_FLAG | 74 MODE_NAMED_FLAG |
75 #endif | 75 #endif |
76 }; | 76 }; |
77 | 77 |
78 // The Hello message is internal to the Channel class. It is sent | 78 // The Hello message is internal to the Channel class. It is sent |
79 // by the peer when the channel is connected. The message contains | 79 // by the peer when the channel is connected. The message contains |
80 // just the process id (pid). The message has a special routing_id | 80 // just the process id (pid). The message has a special routing_id |
81 // (MSG_ROUTING_NONE) and type (HELLO_MESSAGE_TYPE). | 81 // (MSG_ROUTING_NONE) and type (HELLO_MESSAGE_TYPE). |
82 enum { | 82 enum { |
83 HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16), | 83 HELLO_MESSAGE_TYPE = kuint16max, // Maximum value of message type (uint16), |
84 // to avoid conflicting with normal | 84 // to avoid conflicting with normal |
85 // message types, which are enumeration | 85 // message types, which are enumeration |
86 // constants starting from 0. | 86 // constants starting from 0. |
87 | |
88 // The CLOSE_FD_MESSAGE_TYPE is used internall in the IPC class to | |
89 // work around a bug in sendmsg() on Mac. | |
90 CLOSE_FD_MESSAGE_TYPE = kuint16max - 1 | |
Scott Hess - ex-Googler
2013/10/09 20:18:33
internall -> internally.
I think the comment is s
hubbe
2013/10/09 21:34:12
Done.
| |
87 }; | 91 }; |
88 | 92 |
89 // The maximum message size in bytes. Attempting to receive a message of this | 93 // The maximum message size in bytes. Attempting to receive a message of this |
90 // size or bigger results in a channel error. | 94 // size or bigger results in a channel error. |
91 static const size_t kMaximumMessageSize = 128 * 1024 * 1024; | 95 static const size_t kMaximumMessageSize = 128 * 1024 * 1024; |
92 | 96 |
93 // Amount of data to read at once from the pipe. | 97 // Amount of data to read at once from the pipe. |
94 static const size_t kReadBufferSize = 4 * 1024; | 98 static const size_t kReadBufferSize = 4 * 1024; |
95 | 99 |
96 // Initialize a Channel. | 100 // Initialize a Channel. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 | 210 |
207 private: | 211 private: |
208 // PIMPL to which all channel calls are delegated. | 212 // PIMPL to which all channel calls are delegated. |
209 class ChannelImpl; | 213 class ChannelImpl; |
210 ChannelImpl *channel_impl_; | 214 ChannelImpl *channel_impl_; |
211 }; | 215 }; |
212 | 216 |
213 } // namespace IPC | 217 } // namespace IPC |
214 | 218 |
215 #endif // IPC_IPC_CHANNEL_H_ | 219 #endif // IPC_IPC_CHANNEL_H_ |
OLD | NEW |