Method | Description | |
---|---|---|
Connect ( |
Starts waiting for client connections. Blocks the current execution until a client pipe attempts to establish a connection. |
|
ConnectToPipe ( string pipeName ) : |
Connects to a server named pipe on the same machine. This method is used by clients to establish a pipe connection with a server pipe. |
|
ConnectToPipe ( string pipeName, string serverName ) : |
Connects to a server named pipe. This method is used by clients to establish a pipe connection with a server pipe. |
|
Create ( string name, uint outBuffer, uint inBuffer ) : |
Creates a server named pipe.
|
|
Disconnect ( |
Disconnects a server named pipe from the client. Server pipes can be reused by first disconnecting them from the client and then calling the |
|
Flush ( |
Flushes all the data in a named pipe.
|
|
NumberPipeInstances ( |
Returns the number of instances of a named pipe.
|
|
Read ( |
Reads a string from a named pipe using the UTF16 encoding. This function uses |
|
ReadBytes ( |
Reads the bytes from a named pipe. This method expects that the first four bytes in the pipe define the length of the data to read. If the data length is greater than maxBytes the method returns null. |
|
TryConnectToPipe ( string pipeName, |
Tries to connect to a named pipe on the same machine. This method is used mainly when stopping the pipe server. It unblocks the existing pipes, which wait for client connection. |
|
TryConnectToPipe ( string pipeName, string serverName, |
Tries to connect to a named pipe. This method is used mainly when stopping the pipe server. It unblocks the existing pipes, which wait for client connection. |
|
Write ( |
Writes a string to a named pipe. This method converts the text into an array of bytes, using the UTF16 encoding and the uses |
|
WriteBytes ( |
Writes an array of bytes to a named pipe. If we try bytes array we attempt to write is empty then this method write a space character to the pipe. This is necessary because the other end of the pipe uses a blocking Read operation so we must write someting. |
public static Connect ( |
||
handle | The pipe handle. | |
return | void |
public static ConnectToPipe ( string pipeName ) : |
||
pipeName | string | The pipe name. |
return |
public static ConnectToPipe ( string pipeName, string serverName ) : |
||
pipeName | string | The pipe name. |
serverName | string | The server name. |
return |
public static Create ( string name, uint outBuffer, uint inBuffer ) : |
||
name | string | The name of the pipe. |
outBuffer | uint | The size of the outbound buffer. |
inBuffer | uint | The size of the inbound buffer. |
return |
public static Disconnect ( |
||
handle | The pipe handle. | |
return | void |
public static Flush ( |
||
handle | The pipe handle. | |
return | void |
public static NumberPipeInstances ( |
||
handle | The pipe handle. | |
return | uint |
public static Read ( |
||
handle | The pipe handle. | |
maxBytes | int | The maximum bytes to read. |
return | string |
public static ReadBytes ( |
||
handle | The pipe handle. | |
maxBytes | int | The maximum bytes to read. |
return | byte[] |
public static TryConnectToPipe ( string pipeName, |
||
pipeName | string | The name of the pipe. |
handle | The resulting pipe handle. | |
return | bool |
public static TryConnectToPipe ( string pipeName, string serverName, |
||
pipeName | string | The name of the pipe. |
serverName | string | The name of the server. |
handle | The resulting pipe handle. | |
return | bool |
public static Write ( |
||
handle | The pipe handle. | |
text | string | The text to write to the pipe. |
return | void |
public static WriteBytes ( |
||
handle | The pipe handle. | |
bytes | byte | The bytes to write. |
return | void |