CLIENT_SOCKET_READ$
|
Syntax: |
CLIENT_SOCKET_READ$(<Handle>,<Number
of Characters>)
|
||||
|
|
|
||||
|
Meaning: |
This function reads data from a server socket and
returns the read data as string. If <Number of Characters> > 0 and no
data are available CLIENT_SOCKET_READ$ return the empty String "". If <Number of Characters> > 0 and data
are available, then exactly <Number of Characters> characters are read.
The function only returns after <Number of Characters> characters could
be read. If <Number of Characters> = 0 and data are available, a line is read, which means the line is read until a line end character is reached. The function only returns after a line could be read. If
<Number of Characters> = -1, the number of characters is returned which
can be read. If an error occurs, (e.g. Timeout), the
variable ERRORTEXT$ contains the error
report. If no error occurred, the variable ERRORTEXT$
contains the empty string "". <Handle> is the identification number
returned by the function CLIENT_SOCKET. |
||||
|
Parameter: |
|
||||
|
Sample: |
DATA$ = CLIENT_SOCKET_READ$(HANDLE%,NUMBER%) IF NOT ISSPACE(ERRORTEXT$) THEN ERRORMES =
"Error " + ERRORTEXT$ ENDIF |
||||
|
See also: |
|