IPWorks IPC 2020 ActiveX Edition

Questions / Feedback?

PipeClient Control

Properties   Methods   Events   Configuration Settings   Errors  

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

Syntax

PipeClient

Remarks

The PipeClient control 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 control 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 control will behave synchronously and wait for the operation to complete before returning control.

The control 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 control fails with an error.

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.

The default value for the Timeout property is 60 seconds.

Property List


The following is the full list of the properties of the control 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 control.

Method List


The following is the full list of the methods of the control 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.

Event List


The following is the full list of the events fired by the control 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 control is ready to send data.

Configuration Settings


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

AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
InBufferSizeThe size in bytes of the output buffer.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
OutBufferSizeThe size in bytes of the input buffer.
PipeDirectionDetermines the direction data flows.
CodePageThe system code page used for Unicode to Multibyte translations.
UseInternalSecurityAPITells the control whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IPC 2020 ActiveX Edition - Version 20.0 [Build 8155]