Dart SecureTcp, SecureServer Controls
Send Method
String, Byte or Byte array. Contains the data to send.
Specifies the number of bytes to send (limits a String or Byte array to LimitCount bytes).
Defaults to False. If True, Data is sent using the "out-of-band" flag.
Description
Send data after a connection is established. The Send event fires when data is accepted by the system. The SendBufferCount property always indicates the number of bytes that have been submitted but have not yet been accepted by the system.
Syntax
Visual Basic
Public Function Send( _
   ByRef Data As Variant, _
   Optional ByVal LimitCount As Long = 0, _
   Optional ByVal Urgent As Boolean = False _
) As Long
Parameters
Data
String, Byte or Byte array. Contains the data to send.
LimitCount
Specifies the number of bytes to send (limits a String or Byte array to LimitCount bytes).
Urgent
Defaults to False. If True, Data is sent using the "out-of-band" flag.
Return Value
Indicates the number of bytes accepted.
Remarks

This method can only be used when the State property is tcpConnected (otherwise a ptNotConnected error is generated).

Data can be provided in two ways:

If LimitCount is specified and is greater than 0, then the number of bytes sent is limited to LimitCount. For example, if a Byte array of length 8192 contains only 100 bytes that you wish to send, then a LimitCount of 100 can be used to override the default behavior, which would be to send the entire 8192 bytes (the length of the array).

This method supports blocking and non-blocking operation, depending on the value of the Timeout property. The Blocked property may be checked to verify the control is not busy executing another method. If the Timeout property is positive, this method will block until the system accepts the data for sending (SendBufferCount decrements to 0) or the timeout period expires.

Set the Urgent parameter to True to send Out-of-band data. This is not typically used, but some servers rely on it. PowerTCP uses the SO_OOBINLINE socket option to always receive out-of-band data "in-line".

You can also send binary data types and structures. Use the Fill method to receive binary data types and structures.

Error Codes

This method may generate the following error code (refer to ErrorConstants for a complete list of error codes):

See Also

SecureTcp Object  | SecureTcp Members


PowerTCP SSL for ActiveX Documentation Version 2.2.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic