The state model for peer-to-peer streams defines the conditions under which the stream can move from one state to another and coordinates the writer, reader, and host.
The peer-to-peer stream has the following states:
Unlinked—The writer and reader have no connection to the stream, the host, or each other. You must use an application on the host to transition the stream out of the Unlinked state.
Disabled—The writer has the hardware address of the reader and vice versa, but the stream is not prepared to accept data. When the stream is in the Disabled state, no data can flow through the stream.
Enabled—The stream is capable of transmitting data from the writer to the reader. While the stream is in the Enabled state, data can flow from the writer to the reader. The host, reader, and writer can enable the stream when the stream is in a Disabled state.
Flushing—The writer stops accepting new data and sends all existing data to the reader.