Xojo.Net.TCPSocket.ReadData

From Xojo Documentation

Method

Xojo.Net.TCPSocket.ReadData(length As Integer) As Xojo.Core.MemoryBlock

Supported for all project types and targets.

Reads length bytes from the socket.

Notes

This reads the bytes that are in the buffer. Not all data that was sent will necessarily appear in the buffer right away.

Sample Code

// Read all data that is available in the buffer
Var data As MemoryBlock
data = myTCPSocket.ReadData(myTCPSocket.BytesAvailable)