Next Topic

Previous Topic

Book Contents

Read

string Read(int iSize,int iTimeout=1)

Return values

A array of data if the function is successful; otherwise nil if no data could be read, and a specific error code can be retrieved by calling global function GetLastError.

Parameters

  • iSize - When call to function returns the variable is set to the size of the data read. If no data was read this value will be zero.
  • iTimeout - The amount of time in seconds to wait for data to arrive to the socket. Default value is one second.

Remarks

The function only blocks execution for the amount of time specified by the timeout value, if no data is received during this period the function will return a nil value.