IP*Works! IPC - Online Help
Available for:
IP*Works! IPC
Questions / Feedback?

PipeClient Component

Properties   Methods   Events   Configuration Settings   Errors  

The PipeClient component is a simple client for connecting and communicating over named pipes.

Syntax

nsoftware.IPWorksIPC.Pipeclient

Remarks

The PipeClient component is used to connect to an existing pipe server. After connecting the transfer of data is handled very similarly to socket communication.

To begin, first set PipeName to the name of the pipe to which the connection will be made. Call Connect or set Connected to True to establish the connection. The Connected event will fire when the connection is complete.

After connecting set DataToSend, or call Send or SendFile to send data. Incoming data is received through the DataIn event.

To disconnect call Disconnect or set Connected to False.

Synchronous and Asynchronous Operation

If the Timeout property is set to 0, the component will behave asynchronously and all operations return immediately, potentially failing with an error if they can't be completed immediately.

If Timeout is set to a positive value, the component will behave synchronously and wait for the operation to complete before returning control.

The component will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the component throws an exception.

Please note that by default, all timeouts are inactivity timeouts, i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.

Optionally, the behavior of the component may be changed to absolute timeouts, i.e. the component will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by the AbsoluteTimeout configuration setting.

The default value for the Timeout property is 60 seconds.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

AcceptDataEnables or disables data reception (the DataIn event).
BytesSentThe number of bytes actually sent after an assignment to DataToSend .
ConnectedTriggers a connection or disconnection.
DataToSendA string of data to be sent over the connected pipe.
EOLUsed to break the incoming data stream into chunks separated by EOL.
PipeNameThe name of the pipe.
RecordLengthThe length of received data records.
SingleLineModeSpecial mode for line-oriented protocols.
TimeoutA timeout for the component.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting .
ConnectConnects to a named pipe.
DisconnectDisconnects from the named pipe.
DoEventsProcesses events from the internal message queue.
GetLineGets a line of text from the server.
InterruptInterrupts the current action.
SendSends data over the connected pipe.
SendFileSends the file over the connected pipe.
SendLineSends a string followed by a newline.
SetReceiveStreamSets the stream to which received data will be written.
SetSendStreamReads content from the stream and sends it to the server.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

ConnectedFired immediately after a connection completes.
DataInFired when data (complete lines) comes in.
DisconnectedFired when a connection is closed.
ErrorInformation about errors during data delivery.
ReadyToSendFired when the component is ready to send data.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

InBufferSizeThe size in bytes of the output buffer.
OutBufferSizeThe size in bytes of the input buffer.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 1.0.6240.0