Szerkesztés

Megosztás a következőn keresztül:


NamedPipeServerStream.Disconnect Method

Definition

Disconnects the current connection.

public:
 void Disconnect();
public void Disconnect ();
[System.Security.SecurityCritical]
public void Disconnect ();
member this.Disconnect : unit -> unit
[<System.Security.SecurityCritical>]
member this.Disconnect : unit -> unit
Public Sub Disconnect ()
Attributes

Exceptions

No pipe connections have been made yet.

-or-

The connected pipe has already disconnected.

-or-

The pipe handle has not been set.

The pipe is closed.

Remarks

Calling the Disconnect method will block until all the sent characters have been read unless the transmission mode of the pipe is set to Message and the buffer size is set in the constructor that created the NamedPipeServerStream object. In this case, not all of the messages will be received. Calling WaitForPipeDrain causes the server to block until all the data has been read from the pipe.

Applies to