IPWorks SSH 2020 macOS Edition

Questions / Feedback?

Connection Type

A currently connected client.

Remarks

This type describes the connection of a client which is currently connected to the class. You may use the different fields of this type to manage the connection.

Fields

acceptData
Bool

Setting this property to False, temporarily disables data reception (and the DataIn event) on the connection. Setting this to True, re-enables data reception.

bytesSent
Int32

This property shows how many bytes were sent after the last assignment to DataToSend. Please check DataToSend for more information.

Note that this property will always return 0 when the class is operating in synchronous mode (that is, the Timeout property is set to a positive value.)

connected
Bool

This property is used to disconnect individual connections and/or show their status.

The Connected property may be set to false to close the connection.

Connected also shows the status of a particular connection (connected/disconnected).

How and when the connection is closed is controlled by the Linger property. Please refer to its description for more information.

connectionId
String

This property contains an identifier generated by the class to identify each connection. This identifier is unique to this connection.

dataToSendB
Data

This property contains a string of data to be sent to the remote host. Write-only property.

Assigning a string to the DataToSend makes the class send the string to the remote host. The Send method provides similar functionality.

When Timeout is set to 0 the class will behave asynchronously. If you are sending data to the remote host faster than it can process it, or faster than the network's bandwidth allows, the outgoing queue might fill up. When this happens, DataToSend The BytesSent property shows how many bytes were sent (if any). If 0 bytes were sent, then you can wait for the ReadyToSend event before attempting to send data again. (However, please note that ReadyToSend is not fired when part of the data is successfully sent).

dataToSend
String

This property contains a string of data to be sent to the remote host. Write-only property.

Assigning a string to the DataToSend makes the class send the string to the remote host. The Send method provides similar functionality.

When Timeout is set to 0 the class will behave asynchronously. If you are sending data to the remote host faster than it can process it, or faster than the network's bandwidth allows, the outgoing queue might fill up. When this happens, DataToSend The BytesSent property shows how many bytes were sent (if any). If 0 bytes were sent, then you can wait for the ReadyToSend event before attempting to send data again. (However, please note that ReadyToSend is not fired when part of the data is successfully sent).

eolB
Data

The EOL property is used to define boundaries in the input stream using the value of the property.

The EOL property is especially useful with ASCII files. Setting it to enables splitting of the incoming ASCII text stream into lines. In this case, one event is fired for each line received (as well as in packet boundaries). The . bytes are discarded.

The EOL property is a binary string. In particular, this means that it can be more than one byte long, and it can contain NULL bytes.

eol
String

The EOL property is used to define boundaries in the input stream using the value of the property.

The EOL property is especially useful with ASCII files. Setting it to enables splitting of the incoming ASCII text stream into lines. In this case, one event is fired for each line received (as well as in packet boundaries). The . bytes are discarded.

The EOL property is a binary string. In particular, this means that it can be more than one byte long, and it can contain NULL bytes.

idleTimeout
Int32

The idle timeout for this connection. This property is similar to DefaultIdleTimeout but may be set on a per-connection basis to override DefaultIdleTimeout. This property specifies the idle timeout (in seconds) for the connected client. When set to a positive value the class will disconnect idle clients after the specified timeout.

This only applies to clients that have not send to received data within the specified number of seconds.

If set to 0 (default) no idle timeout is applied.

Note: DoEvents must be called in order for the class to check existing connections.

localAddress
String

This property shows the IP address of the interface through which the connection is passing.

LocalAddress is important for multi-homed hosts where it can be used to find which particular network interface an individual connection is going through.

maxLineLength
Int32

This property is the size of an internal buffer which holds received data while waiting for an EOL string.

If an EOL string is found in the input stream before MaxLineLength bytes are received, the DataIn event is fired with the EOL parameter set to True, and the buffer is reset.

If no EOL is found, and MaxLineLength bytes are accumulated in the buffer, the DataIn event is fired with the EOL parameter set to False, and the buffer is reset.

The minimum value for MaxLineLength is 256 bytes. The default value is 2048 bytes.

readyToSend
Bool

Indicates whether the class is ready to send data.

This property indicates that the underlying TCP/IP subsystem is ready to accept data. This is True after a client connects, and will become False after a failed DataToSend.

After a failed DataToSend the ReadyToSend event will fire and this property will be True when data can be sent again.

recordLength
Int32

If set to a positive value, this setting defines the length of data records to be received. The class will accumulate data until RecordLength is reached and only then fire the DataIn event with data of length RecordLength. This allows data to be received as records of known length. This value can be changed at any time, including within the DataIn event.

A value of 0 (default) means this setting is not used.

remoteHost
String

This property shows the IP address of the remote host through which the connection is coming.

The connection must be valid or an error will be fired.

If the class is configured to use a SOCKS firewall, the value assigned to this property may be preceded with an "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.

remotePort
Int32

This property shows the TCP port on the remote host through which the connection is coming.

The connection must be valid or an error will be fired.

singleLineMode
Bool

This property shows the special mode for line-oriented protocols. When SingleLineMode is True, the class treats the incoming data stream as lines separated by CRLF, CR, or LF. The EOL property is ignored.

timeout
Int32

This property specifies a timeout for the class.

If the Timeout property is set to 0, all operations return immediately, potentially failing with a WOULDBLOCK error if data cannot be sent immediately.

If Timeout is set to a positive value, data is sent in a blocking manner and the class will wait for the operation to complete before returning control. The class will handle any potential WOULDBLOCK errors internally and automatically retry the operation for a maximum of Timeout seconds.

The class 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 class .

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 0 (asynchronous operation).

userDataB
Data

The UserData property holds connection specific user specified data.

User specified data may be set or retrieved at any point while the connection is valid. This provides a simple way to associate arbitrary data with a specific connection.

userData
String

The UserData property holds connection specific user specified data.

User specified data may be set or retrieved at any point while the connection is valid. This provides a simple way to associate arbitrary data with a specific connection.

Constructors

public init()

Copyright (c) 2023 /n software inc. - All rights reserved.
IPWorks SSH 2020 macOS Edition - Version 20.0 [Build 8501]