OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 //! \param[in] interface The MachMessageServerInterface that is responsible | 114 //! \param[in] interface The MachMessageServerInterface that is responsible |
115 //! for handling the message. Interface::MachMessageServerRequestSize() is | 115 //! for handling the message. Interface::MachMessageServerRequestSize() is |
116 //! used as the receive size for the request message, and | 116 //! used as the receive size for the request message, and |
117 //! Interface::MachMessageServerReplySize() is used as the | 117 //! Interface::MachMessageServerReplySize() is used as the |
118 //! maximum size of the reply message. If \a options contains | 118 //! maximum size of the reply message. If \a options contains |
119 //! `MACH_RCV_LARGE`, this function will retry a receive operation that | 119 //! `MACH_RCV_LARGE`, this function will retry a receive operation that |
120 //! returns `MACH_RCV_TOO_LARGE` with an appropriately-sized buffer. | 120 //! returns `MACH_RCV_TOO_LARGE` with an appropriately-sized buffer. |
121 //! MachMessageServerInterface::MachMessageServerFunction() is called to | 121 //! MachMessageServerInterface::MachMessageServerFunction() is called to |
122 //! handle the request and populate the reply. | 122 //! handle the request and populate the reply. |
123 //! \param[in] receive_port The port on which to receive the request message. | 123 //! \param[in] receive_port The port on which to receive the request message. |
124 //! \param[in] options Options suitable for mach_msg. | 124 //! \param[in] options Options suitable for mach_msg. For the defaults, use |
| 125 //! `MACH_MSG_OPTION_NONE`. |
125 //! \param[in] persistent Chooses between one-shot and persistent operation. | 126 //! \param[in] persistent Chooses between one-shot and persistent operation. |
126 //! \param[in] nonblocking Chooses between blocking and nonblocking operation. | 127 //! \param[in] nonblocking Chooses between blocking and nonblocking operation. |
127 //! \param[in] timeout_ms When \a nonblocking is `false`, the the maximum | 128 //! \param[in] timeout_ms When \a nonblocking is `false`, the the maximum |
128 //! duration that this entire function will run, in milliseconds, or | 129 //! duration that this entire function will run, in milliseconds, or |
129 //! `MACH_MSG_TIMEOUT_NONE` to specify no timeout (infinite waiting). When | 130 //! `MACH_MSG_TIMEOUT_NONE` to specify no timeout (infinite waiting). When |
130 //! \a nonblocking is `true`, this parameter has no effect. When \a | 131 //! \a nonblocking is `true`, this parameter has no effect. When \a |
131 //! persistent is `true`, the timeout applies to the overall duration of | 132 //! persistent is `true`, the timeout applies to the overall duration of |
132 //! this function, not to any individual `mach_msg()` call. | 133 //! this function, not to any individual `mach_msg()` call. |
133 //! | 134 //! |
134 //! \return On success, `KERN_SUCCESS` (when \a persistent is `false`) or | 135 //! \return On success, `KERN_SUCCESS` (when \a persistent is `false`) or |
(...skipping 10 matching lines...) Expand all Loading... |
145 Nonblocking nonblocking, | 146 Nonblocking nonblocking, |
146 mach_msg_timeout_t timeout_ms); | 147 mach_msg_timeout_t timeout_ms); |
147 | 148 |
148 private: | 149 private: |
149 DISALLOW_IMPLICIT_CONSTRUCTORS(MachMessageServer); | 150 DISALLOW_IMPLICIT_CONSTRUCTORS(MachMessageServer); |
150 }; | 151 }; |
151 | 152 |
152 } // namespace crashpad | 153 } // namespace crashpad |
153 | 154 |
154 #endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_SERVER_H_ | 155 #endif // CRASHPAD_UTIL_MACH_MACH_MESSAGE_SERVER_H_ |
OLD | NEW |