<div class="content" name="SendRTMessage" uuid="29286e32-6bc7-4108-aa3e-a55ee67a1a30"><p>The SendRTMessage method determines whether roundtrip
communication works between two network addresses.</p><p>The server SHOULD fail this method if the server <b>Initialization
State</b> is FALSE.</p><dl>
<dd>
<div><pre> HRESULT SendRTMessage(
   [in] BSTR SourceIPAddress,
   [in] BSTR DestIPAddress,
   [in] unsigned short DestPort,
   [in] unsigned short AddressFamily,
   [in] unsigned long MessageSize,
   [in] unsigned long Timeout,
   [out] unsigned long* RTElapsedTime
 );
</pre></div>
</dd></dl><p><b>SourceIPAddress: </b>The address from which to
send the network request. <span><a href="b30bcd1c-8ff6-46d2-a27e-61bd85ace9f4#gt_0f25c9b5-dc73-4c3e-9433-f09d1f62ea8e" data-linktype="relative-path">IPv4</a></span> addresses MUST
be represented in dotted decimal notation. <span><a href="b30bcd1c-8ff6-46d2-a27e-61bd85ace9f4#gt_64c29bb6-c8b2-4281-9f3a-c1eb5d2288aa" data-linktype="relative-path">IPv6</a></span> addresses MUST
be represented in the form specified by <span><a href="https://go.microsoft.com/fwlink/?LinkId=108348" data-linktype="external">[RFC1924]</a></span>.<a id="Appendix_A_Target_23"></a><a aria-label="Product behavior note 23" href="6ea29e14-9c33-4927-90a8-258fd1d6d042#Appendix_A_23" data-linktype="relative-path">&lt;23&gt;</a></p><p><b>DestIPAddress: </b>The address to which to send
the network request. The address is in the same representation as <i>SourceIPAddress</i>.</p><p><b>DestPort: </b>This server MUST ignore this value.</p><p><b>AddressFamily: </b>The address type of the <i>SourceIPAddress</i>
and <i>DestIPAddress</i> parameters.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>AF_INET 0x0002</td>
  <td>The addresses are in IPv4 format.</td>
 </tr><tr>
  <td>AF_INET6 0x0017</td>
  <td>The addresses are in IPv6 format.</td>
 </tr></tbody></table>
</dd></dl><p><b>MessageSize: </b>The server MUST ignore this
value.</p><p><b>Timeout: </b>An implementation-specific value<a id="Appendix_A_Target_24"></a><a aria-label="Product behavior note 24" href="6ea29e14-9c33-4927-90a8-258fd1d6d042#Appendix_A_24" data-linktype="relative-path">&lt;24&gt;</a> indicating the maximum amount
of time to wait for a response from the destination address.</p><p><b>RTElapsedTime: </b>The elapsed time (in
milliseconds) between when the server sends the message from the <i>SourceIPAddress</i>
to <i>DestIPAddress</i> and when it receives a reply from the destination
address.</p><p><b>Return Values: </b>A signed 32-bit value that
indicates return status. If the method returns a negative value, it has failed.
Zero or positive values indicate success, with the lower 16 bits in positive
nonzero values containing warnings or flags defined in the method
implementation. For more information about Win32 error codes and <span><a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a></span>
values, see <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>
sections <span><a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a></span>
and <span><a href="../ms-erref/0642cb2f-2075-4469-918c-4441e69c548a" data-linktype="relative-path">2.1</a></span>.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 S_OK</td>
  <td>The call was successful.</td>
 </tr></tbody></table>
</dd>
<dd>
<p>For any other condition, this method MUST return a
value that is not one of the values listed in the preceding table. The client
MUST behave in one consistent, identical manner for all values that are not
listed in the preceding table.</p>
</dd></dl><p>Exceptions Thrown: No exceptions are thrown beyond those
thrown by the underlying <span><a href="b30bcd1c-8ff6-46d2-a27e-61bd85ace9f4#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> protocol <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>.</p><p>The <span><a href="b30bcd1c-8ff6-46d2-a27e-61bd85ace9f4#gt_e127848e-c66d-427d-b3aa-9f904fa4ada7" data-linktype="relative-path">opnum</a></span> field value
for this method is 3.</p><p>When processing this call, the server MUST do the following:</p><ul><li><p><span><span> 
</span></span>Initialize the Round-Trip Message Timer to 1000 milliseconds.</p>
</li><li><p><span><span> 
</span></span>Use an implementation-specific mechanism to send a network
message from <i>SourceIPAddress</i> to <i>DestIPAddress</i>, such that a reply
message is sent back from <i>DestIPAddress</i> to the <i>SourceIPAddress</i>.</p>
<p><b>Note</b>  While
performing the round-trip message operation, use an implementation-specific
mechanism to determine the elapsed time. For example, prior to sending the
message, observe the current time of day in millisecond granularity. Upon
receipt of the reply, again observe the current time of day. The elapsed time
can be calculated by subtracting the first observed value from the second.</p>
</li><li><p><span><span> 
</span></span>If the <span><a href="3548d173-75d3-4618-bc68-b4d7e5e3e785" data-linktype="relative-path">Round-Trip Message
Timer (section 3.6.2.1)</a></span> expires before receiving the
reply, the server MUST return an error code.</p>
</li></ul><p>Return the following information to the client:</p><ul><li><p><span><span> 
</span></span>The elapsed time (in milliseconds) between when the server sends
the message from the <i>SourceIPAddress</i> to <i>DestIPAddress</i> and when it
receives a reply from the destination address.</p>
</li></ul></div>