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

Used by server applications to communicate with client ones by using named pipes.
Inheritance: APipeConnection
Mostra file Open project: rsdn/janus Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Closes the operating system native handle of the named pipe.

Connect ( ) : void

Starts listening to client pipe connections.

This method will block the program execution until a client pipe attempts to establish a connection.

When a client named pipe is disconnected, the server one is not closed. The latter can later be reused by starting to listen again.

Disconnect ( ) : void

Disconnects a client named pipe.

When a client named pipe is disconnected, the server one is not closed. The latter can later be reused by starting to listen again.

In a message oriented protocol the server will disconnect the client when the response is sent and all the data is flushed. The same server named pipe could then be reused by calling the Connect method.

ServerPipeConnection ( string name, uint outBuffer, uint inBuffer, int maxReadBytes )

Creates a ServerPipeConnection instance and the underlying operating system handle.

Method Details

Close() public method

Closes the operating system native handle of the named pipe.
public Close ( ) : void
return void

Connect() public method

Starts listening to client pipe connections.
This method will block the program execution until a client pipe attempts to establish a connection.

When a client named pipe is disconnected, the server one is not closed. The latter can later be reused by starting to listen again.

public Connect ( ) : void
return void

Disconnect() public method

Disconnects a client named pipe.
When a client named pipe is disconnected, the server one is not closed. The latter can later be reused by starting to listen again.

In a message oriented protocol the server will disconnect the client when the response is sent and all the data is flushed. The same server named pipe could then be reused by calling the Connect method.
public Disconnect ( ) : void
return void

ServerPipeConnection() public method

Creates a ServerPipeConnection instance and the underlying operating system handle.
public ServerPipeConnection ( string name, uint outBuffer, uint inBuffer, int maxReadBytes )
name string The name of the pipe.
outBuffer uint The outbound buffer.
inBuffer uint The inbound buffer.
maxReadBytes int The maximum bytes to read from clients.