PowerTCP FTP for .NET
WriteTaskAsync Method



Byte array of data to send.
The position in the data buffer at which to begin sending data.
The number of bytes to send.
Start an awaitable asynchronous write on the socket.
Syntax
Public Function WriteTaskAsync( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
) As Task(Of Data)
Dim instance As TcpBase
Dim buffer() As Byte
Dim offset As Integer
Dim count As Integer
Dim value As Task(Of Data)
 
value = instance.WriteTaskAsync(buffer, offset, count)
public Task<Data> WriteTaskAsync( 
   byte[] buffer,
   int offset,
   int count
)
public:
Task<Data^>^ WriteTaskAsync( 
   array<byte>^ buffer,
   int offset,
   int count
) 

Parameters

buffer
Byte array of data to send.
offset
The position in the data buffer at which to begin sending data.
count
The number of bytes to send.

Return Value

A task that represents the asynchronous read operation. The value of the TResult parameter contains the Data object encapsulating the written data (null if the socket is closed).
Remarks
WriteTaskAsync encapsulates WriteAsync and its callback into an easy-to-use awaitable method, leveraging the benefits of IO completion ports without the complexity of callbacks.
See Also

Reference

TcpBase Class
TcpBase Members


PowerTCP FTP for .NET Documentation Version 6.1
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic