Skip to main content

interp_read_socket

Function interp_read_socket 

Source
fn interp_read_socket(
    args: &[RValue],
    named: &[(String, RValue)],
    context: &BuiltinContext<'_>,
) -> Result<RValue, RError>
Expand description

Read up to maxlen bytes from a TCP socket connection.

Returns the data as a character string. If no data is available, blocks until data arrives or the connection is closed.

@param socket integer scalar: connection ID of a TCP socket @param maxlen integer scalar: maximum number of bytes to read (default 256) @return character scalar containing the data read