Difference between revisions of "TCPSocket.SendProgress"

From Xojo Documentation

 
Line 1: Line 1:
{{Deprecated|version=2019r2|replacement=[[TCPSocket.SendingProgressed]]}}
+
{{EventBox
 +
| name=SendProgress
 +
| ownertype=class
 +
| owner=TCPSocket
 +
| parameters=bytesSent as [[Integer]], bytesLeft as [[Integer]]
 +
| returntype=[[Boolean]]
 +
| platform=all
 +
}}
 +
{{Description
 +
|text = Occurs when your network provider queues your data in chunks and is about to send the next chunk.}}
 +
 
 +
==Notes==
 +
 
 +
The parameters indicate the amount of progress that has been made during the send. Returns a [[Boolean]].
 +
 
 +
Returning [[True]] from this event causes the send to be cancelled. This does not close the socket's connection; it only clears the buffer. After all of the data has been transferred you will get a final SendProgress event followed by a [[SocketCore.SendComplete|SendComplete]] event.
 +
 
 +
''bytesSent'' is the number of bytes that were sent in the chunk, not the total number of bytes sent.

Latest revision as of 22:04, 11 November 2019

Event


TCPSocket.SendProgress(bytesSent as Integer, bytesLeft as Integer) As Boolean

Supported for all project types and targets.

Occurs when your network provider queues your data in chunks and is about to send the next chunk.

Notes

The parameters indicate the amount of progress that has been made during the send. Returns a Boolean.

Returning True from this event causes the send to be cancelled. This does not close the socket's connection; it only clears the buffer. After all of the data has been transferred you will get a final SendProgress event followed by a SendComplete event.

bytesSent is the number of bytes that were sent in the chunk, not the total number of bytes sent.