IPWorks P2P 2020 Kotlin Edition

Questions / Feedback?

DataToSend Property

A string of data to be sent to the remote host.

Syntax

public fun setDataToSend(dataToSend: String)
public fun setDataToSend(dataToSend: ByteArray?)

Default Value

""

Remarks

Assigning a string to this property makes the component send the string to the remote host. The Send method provides similar functionality.

When Timeout is set to a positive value (default) the componentwill behave synchronously. The component will not return control until all data has been delivered or an error is encountered.

When Timeout is set to 0 the component will behave asynchronously. The component will return control immediately. If data is being sent quickly and more than MaxOutgoingOutstandingCount packets are unacknowledged DataToSend will fail with a "Wouldblock" exception. When this exception occurs the BytesSent property holds the number of bytes that were sent (if any). Monitor the ReadyToSend event to determine when sending can resume. Resend the data which previously caused the exception after ReadyToSend fires.

This property is write-only and not available at design time.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks P2P 2020 Kotlin Edition - Version 20.0 [Build 7941]