This page describes the Asynchronous Pipe State for RPC calls.
IN Pipe
Client Behavior
| State | State Name | Action |
|---|---|---|
| C | Make the call | Make the RPC<ul><li>On success go to state WS</li><li>On exception go to End</li></ul>To fail: go to Can |
| P | Push | Make a push<ul><li>On failure go to End</li><li>On success go to WS</li></ul>To fail: go to Can |
| WS | Wait for Send | Wait for notification<ul><li>On failure to get a notification go to Can</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcSendComplete</a> is received and more data needs to be sent go to P</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcSendComplete</a> is received and more data does not need to be sent go to NP</li><li>If a failure <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcCallComplete</a> is received go Comp</li></ul>To fail: go to Can |
| NP | Null Push | Push 0 bytes (null push)<ul><li>On failure go to End</li><li>On success go to WComp</li></ul>To fail: go to Can |
| Can | Cancel the Call | Call <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasynccancelcall">RpcAsyncCancelCall</a>Go to WComp |
| WComp | Wait for Completion | Wait for notificationCall-complete notification should be received. Go to Comp |
| Comp | Completion | Issue <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasynccompletecall">RpcAsyncCompleteCall</a>Go to End |
| End |
Server Behavior
| State | State Name | Action |
|---|---|---|
| D | Dispatch | The call is dispatched by the RPC runtime Go to P To fail fatally (while executing on the RPC thread): Raise exception; go to End To fail gracefully: Go to A |
| P | Pull | Make a pull<ul><li>On failure go to End</li><li>On success and synchronous completion with non-zero bytes read go to P</li><li>On success and synchronous completion with zero bytes read (null pull) go to Comp</li><li>On success and asynchronous completion (ERROR_IO_PENDING is returned) go to WP</li></ul>To fail: go to A |
| WP | Wait for Pull | Wait for notification<ul><li>On failure to get a completion go to A</li><li>If a failure <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received go to A</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received with non-zero bytes read go to P</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received with zero bytes read (null pull) go to Comp</li><li>If a failure is received go to A</li></ul>To fail: go to A |
| A | Abort the Call | Call <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasyncabortcall">RpcAsyncAbortCall</a>Go to End |
| Comp | Completion | Call <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasynccompletecall">RpcAsyncCompleteCall</a>Go to End |
| End |
OUT Pipe
Client Behavior
| State | State Name | Action |
|---|---|---|
| C | Make the call | Make the RPC<ul><li>On success go to P</li><li>On failure go to Comp</li></ul>To fail: go to Can |
| P | Pull | Make a pull<ul><li>On failure go to End</li><li>On success and synchronous completion with non-zero bytes read go to P</li><li>On success and synchronous completion with zero bytes read (null pull) go to WComp</li><li>On success and asynchronous completion (ERROR_IO_PENDING is returned) go to WP</li></ul>To fail: go to Can |
| WP | Wait for Pull | Wait for notification<ul><li>On failure to get a completion go to Can</li><li>If a failure <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received go to Can</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received with non-zero bytes read go to P</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received with zero bytes read (null pull) go to Comp</li><li>If a failure is received go Can</li></ul>To fail: go to Can |
| Can | Cancel the Call | Call <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasynccancelcall">RpcAsyncCancelCall</a>Go to WComp |
| WComp | Wait for Completion | Wait for notification. Call-complete notification should be received. Go to Comp |
| Comp | Completion | Issue <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasynccompletecall">RpcAsyncCompleteCall</a>Go to End |
| End |
Server Behavior
| State | State Name | Action |
|---|---|---|
| D | Dispatch | The call is dispatched by the RPC runtime Go to P To fail fatally (while executing on the RPC thread): Raise exception; go to End To fail gracefully: Go to A |
| P | Push | Make a push<ul><li>On success go to WP</li><li>On failure go to End</li></ul>To fail: go to A |
| WP | Wait for Push | Wait for notification<ul><li>On failure to get a completion go to A</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcSendComplete</a> is received and more data needs to be sent go to P</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcSendComplete</a> is received and more data does not need to be sent go to NP</li><li>If a failure is received go Comp</li></ul>To fail: go to A |
| NP | Null Push | Push 0 bytes<ul><li>on success go to WNP</li><li>on failure go to Comp</li></ul>To fail: go to A |
| WNP | Wait for Null Push | Wait for notification<ul><li>On failure to get a completion go to A</li><li>If a failure is received go Comp</li><li>If a success is received go Comp</li></ul> |
| A | Abort the Call | Call <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasyncabortcall">RpcAsyncAbortCall</a>; go to End |
| Comp | Completion | Issue <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasynccompletecall">RpcAsyncCompleteCall</a>; go to End |
| End |
IN-OUT Pipe
Client Behavior
| State | State Name | Action |
|---|---|---|
| C | Make the call | Make the RPC<ul><li>On success go to WS</li><li>On exception go to End</li></ul>To fail: go to Can |
| PS | Push | Make a push<ul><li>On failure go to End</li><li>On success go to WS</li></ul>To fail: go to Can |
| WS | Wait for Send | Wait for notification<ul><li>On failure to get a notification go to Can</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcSendComplete</a> is received and more data needs to be sent go to PS</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcSendComplete</a> is received and more data does not need to be sent go to NP</li><li>If a failure <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcCallComplete</a> is received go Comp</li></ul>To fail: go to Can |
| NP | Null Push | Push 0 bytes (null push)<ul><li>On failure go to End</li><li>On success go to PL</li></ul>To fail: go to Can |
| PL | Pull | Make a pull<ul><li>On failure go to End</li><li>On success and synchronous completion with non-zero bytes read go to PL</li><li>On success and synchronous completion with zero bytes read (null pull) go to WComp</li><li>On success and asynchronous completion (ERROR_IO_PENDING is returned) go to WPL</li></ul>To fail: go to Can |
| WPL | Wait for Pull | Wait for notification<ul><li>On failure to get a completion go to Can</li><li>If a failure <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received go to Can</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received with non-zero bytes read go to PL</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received with zero bytes read go to Comp</li><li>If a failure is received go Can</li></ul>To fail: go to Can |
| Can | Cancel the Call | Call <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasynccancelcall">RpcAsyncCancelCall</a>Go to WComp |
| WComp | Wait for Completion | Wait for notification. CallComplete notification should be received. Go to Comp |
| Comp | Completion | Issue <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasynccompletecall">RpcAsyncCompleteCall</a>Go to End |
| End |
Server Behavior
| State | State Name | Action |
|---|---|---|
| D | Dispatch | The call is dispatched by the RPC runtimeGo to PL To fail fatally (while executing on the RPC thread): Raise exception; go to End To fail gracefully: Go to A |
| PL | Pull | Make a pull<ul><li>On failure go to End</li><li>On success and synchronous completion with non-zero bytes read go to PL</li><li>On success and synchronous completion with zero bytes read (null pull) go to PS</li><li>On success and asynchronous completion (ERROR_IO_PENDING is returned) go to WPL</li></ul>To fail: go to A |
| WPL | Wait for Pull | Wait for notification<ul><li>On failure to get a completion go to A</li><li>If a failure <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received go to A</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received with non-zero bytes read go to PL</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcReceiveComplete</a> is received with zero bytes read go to PS</li><li>If a failure is received go A</li></ul>To fail: go to A |
| PS | Push | Make a push<ul><li>On success go to WPS</li><li>On failure go to End</li></ul>To fail: go to A |
| WPS | Wait for Push | Wait for notification<ul><li>On failure to get a completion go to A</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcSendComplete</a> is received and more data needs to be sent go to PS</li><li>If a success <a href="/windows/desktop/api/Rpcasync/ne-rpcasync-rpc_async_event">RpcSendComplete</a> is received and more data does not need to be sent go to NP</li><li>If a failure is received go Comp</li></ul>To fail: go to A |
| NP | Null Push | Push 0 bytes<ul><li>on success go to WNP</li><li>on failure go to Comp</li></ul>To fail: go to A |
| WNP | Wait for Null Push | Wait for notification<ul><li>On failure to get a completion go to A</li><li>If a failure is received go Comp</li><li>If a success is received go Comp</li></ul> |
| A | Abort the Call | Call <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasyncabortcall">RpcAsyncAbortCall</a>; go to End |
| Comp | Completion | Issue <a href="/windows/desktop/api/Rpcasync/nf-rpcasync-rpcasynccompletecall">RpcAsyncCompleteCall</a>; go to End |
| End |
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
