C# Class wyDay.Controls.PipeClient

Allow pipe communication between a server and a client.
Inheritance: IDisposable
显示文件 Open project: RagingBigFemaleBird/sgs Class Usage Examples

Public Methods

Method Description
Connect ( string pipename ) : void

Connects to the server with a pipename.

Disconnect ( ) : void

Disconnects from the server.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

SendMessage ( byte message ) : bool

Sends a message to the server.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

Private Methods

Method Description
CreateFile ( string pipeName, uint dwDesiredAccess, uint dwShareMode, IntPtr lpSecurityAttributes, uint dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplate ) : SafeFileHandle
Read ( ) : void

Method Details

Connect() public method

Connects to the server with a pipename.
public Connect ( string pipename ) : void
pipename string The name of the pipe to connect to.
return void

Disconnect() public method

Disconnects from the server.
public Disconnect ( ) : void
return void

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool Result: true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

SendMessage() public method

Sends a message to the server.
public SendMessage ( byte message ) : bool
message byte The message to send.
return bool