<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A Mach RPC callback interface, called by <aclass="el"href="classcrashpad_1_1MachMessageServer.html#ace981f2e495984f119aa074f7d33bff6"title="Runs a Mach message server to handle a Mach RPC request for MIG servers. ">Run()</a>. <ahref="classcrashpad_1_1MachMessageServer_1_1Interface.html#details">More...</a><br/></td></tr>
<trclass="memitem:a737f51adaf8725883f1158ef2576aae8"><tdclass="memItemLeft"align="right"valign="top">enum  </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classcrashpad_1_1MachMessageServer.html#a737f51adaf8725883f1158ef2576aae8">Persistent</a><trclass="memdesc:a737f51adaf8725883f1158ef2576aae8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Informs <aclass="el"href="classcrashpad_1_1MachMessageServer.html#ace981f2e495984f119aa074f7d33bff6"title="Runs a Mach message server to handle a Mach RPC request for MIG servers. ">Run()</a> whether to handle a single request-reply transaction or to run in a loop. <ahref="classcrashpad_1_1MachMessageServer.html#a737f51adaf8725883f1158ef2576aae8">More...</a><br/></td></tr>
<trclass="memitem:ad4e5a9fe58ebd1a86f21d8a2284129ed"><tdclass="memItemLeft"align="right"valign="top">enum  </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classcrashpad_1_1MachMessageServer.html#ad4e5a9fe58ebd1a86f21d8a2284129ed">ReceiveLarge</a><trclass="memdesc:ad4e5a9fe58ebd1a86f21d8a2284129ed"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Determines how to handle the reception of messages larger than the size of the buffer allocated to store them. <ahref="classcrashpad_1_1MachMessageServer.html#ad4e5a9fe58ebd1a86f21d8a2284129ed">More...</a><br/></td></tr>
<trclass="memdesc:ace981f2e495984f119aa074f7d33bff6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Runs a Mach message server to handle a Mach RPC request for MIG servers. <ahref="#ace981f2e495984f119aa074f7d33bff6">More...</a><br/></td></tr>
<divclass="textblock"><p>Runs a Mach message server to handle a Mach RPC request for MIG servers. </p>
<p>The principal entry point to this interface is the static <aclass="el"href="classcrashpad_1_1MachMessageServer.html#ace981f2e495984f119aa074f7d33bff6"title="Runs a Mach message server to handle a Mach RPC request for MIG servers. ">Run()</a> method. </p>
<p>Informs <aclass="el"href="classcrashpad_1_1MachMessageServer.html#ace981f2e495984f119aa074f7d33bff6"title="Runs a Mach message server to handle a Mach RPC request for MIG servers. ">Run()</a> whether to handle a single request-reply transaction or to run in a loop. </p>
<tr><thcolspan="2">Enumerator</th></tr><tr><tdclass="fieldname"><aid="a737f51adaf8725883f1158ef2576aae8aa2c8263ef8e0afb54cc5d01c6ac3a735"></a>kOneShot </td><tdclass="fielddoc"><p>Handle a single request-reply transaction and then return. </p>
<tr><tdclass="fieldname"><aid="a737f51adaf8725883f1158ef2576aae8a9f7aa4de8d84bd299a296d7b289c6047"></a>kPersistent </td><tdclass="fielddoc"><p>Run in a loop, potentially handling multiple request-reply transactions. </p>
<tr><thcolspan="2">Enumerator</th></tr><tr><tdclass="fieldname"><aid="ad4e5a9fe58ebd1a86f21d8a2284129eda9d5505bdd5aa2fd0789d3e79befd5d11"></a>kReceiveLargeError </td><tdclass="fielddoc"><p>Return <code>MACH_RCV_TOO_LARGE</code> upon receipt of a large message. </p>
<tr><tdclass="fieldname"><aid="ad4e5a9fe58ebd1a86f21d8a2284129eda1ffaaf6cc781039178422e5d05204b71"></a>kReceiveLargeIgnore </td><tdclass="fielddoc"><p>Ignore large messages, and attempt to receive the next queued message upon encountering one. </p>
<p>When a large message is encountered, a warning will be logged.</p>
<p><code>mach_msg()</code> will be called to receive the next message after a large one even when accompanied by a <aclass="el"href="classcrashpad_1_1MachMessageServer.html#a737f51adaf8725883f1158ef2576aae8"title="Informs Run() whether to handle a single request-reply transaction or to run in a loop...">Persistent</a> value of <aclass="el"href="classcrashpad_1_1MachMessageServer.html#a737f51adaf8725883f1158ef2576aae8aa2c8263ef8e0afb54cc5d01c6ac3a735"title="Handle a single request-reply transaction and then return. ">kOneShot</a>. </p>
<tr><tdclass="fieldname"><aid="ad4e5a9fe58ebd1a86f21d8a2284129eda865451f339d9413541ca25c22d9b2c71"></a>kReceiveLargeResize </td><tdclass="fielddoc"><p>Allocate an appropriately-sized buffer upon encountering a large message. The buffer will be used to receive the message. This. </p>
<p>Runs a Mach message server to handle a Mach RPC request for MIG servers. </p>
<p>This function listens for a request message and passes it to a callback interface. A reponse is collected from that interface, and is sent back as a reply.</p>
<p>This function is similar to <code>mach_msg_server()</code> and <code>mach_msg_server_once()</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">interface</td><td>The MachMessageServerInterface that is responsible for handling the message. <aclass="el"href="classcrashpad_1_1MachMessageServer_1_1Interface.html#a319dd9279e87b4407cee3c8feca405ab">Interface::MachMessageServerRequestSize()</a> is used as the receive size for the request message, and <aclass="el"href="classcrashpad_1_1MachMessageServer_1_1Interface.html#ad4e6169aeb91074d573e77b9a47266c5">Interface::MachMessageServerReplySize()</a> is used as the maximum size of the reply message. If <em>options</em> contains <code>MACH_RCV_LARGE</code>, this function will retry a receive operation that returns <code>MACH_RCV_TOO_LARGE</code> with an appropriately-sized buffer. MachMessageServerInterface::MachMessageServerFunction() is called to handle the request and populate the reply. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">receive_port</td><td>The port on which to receive the request message. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">options</td><td>Options suitable for mach_msg. For the defaults, use <code>MACH_MSG_OPTION_NONE</code>. <code>MACH_RCV_LARGE</code> when specified here is ignored. Set <em>receive_large</em> to <aclass="el"href="classcrashpad_1_1MachMessageServer.html#ad4e5a9fe58ebd1a86f21d8a2284129eda865451f339d9413541ca25c22d9b2c71"title="Allocate an appropriately-sized buffer upon encountering a large message. The buffer will be used to ...">kReceiveLargeResize</a> instead. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">persistent</td><td>Chooses between one-shot and persistent operation. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">receive_large</td><td>Determines the behavior upon encountering a message larger than the receive buffer’s size. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">timeout_ms</td><td>The maximum duration that this entire function will run, in milliseconds. This may be <aclass="el"href="namespacecrashpad.html#a217c8826b1e8ca5539eee63b3ab9e612a15aaf8991271871ab08493449c00a048"title="When passed to MachMessageDeadlineFromTimeout(), that function will return kMachMessageDeadlineNonblo...">kMachMessageTimeoutNonblocking</a> or <aclass="el"href="namespacecrashpad.html#a217c8826b1e8ca5539eee63b3ab9e612aaf4f2c8a649ea6bcfe896e77c312315f"title="When passed to MachMessageDeadlineFromTimeout(), that function will return kMachMessageDeadlineWaitIn...">kMachMessageTimeoutWaitIndefinitely</a>. When <em>persistent</em> is <aclass="el"href="classcrashpad_1_1MachMessageServer.html#a737f51adaf8725883f1158ef2576aae8a9f7aa4de8d84bd299a296d7b289c6047"title="Run in a loop, potentially handling multiple request-reply transactions. ">kPersistent</a>, the timeout applies to the overall duration of this function, not to any individual <code>mach_msg()</code> call.</td></tr>
<dlclass="section return"><dt>Returns</dt><dd>On success, <code>MACH_MSG_SUCCESS</code> (when <em>persistent</em> is <aclass="el"href="classcrashpad_1_1MachMessageServer.html#a737f51adaf8725883f1158ef2576aae8aa2c8263ef8e0afb54cc5d01c6ac3a735"title="Handle a single request-reply transaction and then return. ">kOneShot</a>) or <code>MACH_RCV_TIMED_OUT</code> (when <em>persistent</em> is <aclass="el"href="classcrashpad_1_1MachMessageServer.html#a737f51adaf8725883f1158ef2576aae8aa2c8263ef8e0afb54cc5d01c6ac3a735"title="Handle a single request-reply transaction and then return. ">kOneShot</a> and <em>timeout_ms</em> is not <aclass="el"href="namespacecrashpad.html#a217c8826b1e8ca5539eee63b3ab9e612aaf4f2c8a649ea6bcfe896e77c312315f"title="When passed to MachMessageDeadlineFromTimeout(), that function will return kMachMessageDeadlineWaitIn...">kMachMessageTimeoutWaitIndefinitely</a>). This function has no successful return value when <em>persistent</em> is <aclass="el"href="classcrashpad_1_1MachMessageServer.html#a737f51adaf8725883f1158ef2576aae8a9f7aa4de8d84bd299a296d7b289c6047"title="Run in a loop, potentially handling multiple request-reply transactions. ">kPersistent</a> and <em>timeout_ms</em> is <aclass="el"href="namespacecrashpad.html#a217c8826b1e8ca5539eee63b3ab9e612aaf4f2c8a649ea6bcfe896e77c312315f"title="When passed to MachMessageDeadlineFromTimeout(), that function will return kMachMessageDeadlineWaitIn...">kMachMessageTimeoutWaitIndefinitely</a>. On failure, returns a value identifying the nature of the error. A request received with a reply port that is (or becomes) a dead name before the reply is sent will result in <code>MACH_SEND_INVALID_DEST</code> as a return value, which may or may not be considered an error from the caller’s perspective. </dd></dl>