C# Class Rsdn.Janus.Framework.Ipc.ClientPipeConnection

Used by client applications to communicate with server ones by using named pipes.
Inheritance: APipeConnection
ファイルを表示 Open project: rsdn/janus Class Usage Examples

Public Methods

Method Description
ClientPipeConnection ( string name ) : System

Creates an instance of the ClientPipeConnection assuming that the server pipe is created on the same machine.

The maximum bytes to read from the client is set to be Int32.MaxValue.

ClientPipeConnection ( string name, string server ) : System

Creates an instance of the ClientPipeConnection specifying the network name of the server.

The maximum bytes to read from the client is set to be Int32.MaxValue.

Close ( ) : void

Closes a client named pipe connection.

A client pipe connection is closed by closing the underlying pipe handle.

Connect ( ) : void

Connects a client pipe to an existing server one.

TryConnect ( ) : bool

Attempts to establish a connection to the a server named pipe.

If the attempt is successful the method creates the field.

This method is used when it is not known whether a server pipe already exists.

Method Details

ClientPipeConnection() public method

Creates an instance of the ClientPipeConnection assuming that the server pipe is created on the same machine.
The maximum bytes to read from the client is set to be Int32.MaxValue.
public ClientPipeConnection ( string name ) : System
name string The name of the server pipe.
return System

ClientPipeConnection() public method

Creates an instance of the ClientPipeConnection specifying the network name of the server.
The maximum bytes to read from the client is set to be Int32.MaxValue.
public ClientPipeConnection ( string name, string server ) : System
name string The name of the server pipe.
server string The network name of the machine, where the server pipe is created.
return System

Close() public method

Closes a client named pipe connection.
A client pipe connection is closed by closing the underlying pipe handle.
public Close ( ) : void
return void

Connect() public method

Connects a client pipe to an existing server one.
public Connect ( ) : void
return void

TryConnect() public method

Attempts to establish a connection to the a server named pipe.
If the attempt is successful the method creates the field.

This method is used when it is not known whether a server pipe already exists.
public TryConnect ( ) : bool
return bool