int rfiosetopt (int opt, int *pval, int len)
int rfio_setbufsize (int s, int bufsize)
rfio_setbufsize sets the size of the readahead buffer to be used on a particular socket connection.
opt can have on of the following values:
If set to RFIO_READBUF, an internal buffer is allocated in the client API, each call to the server fills this buffer and the user buffer is filled from the internal buffer. There is one server call per buffer fill.
If set to RFIO_READAHEAD, an initial call is sent to the server which pushes data to the client buffer until end of file is reached or an error occurs or a new request comes from the client. There is no intermediate buffer unless RFIO_READBUF|RFIO_READAHEAD is specified.
If RFIO_STREAM is set, the V3 protocol is enabled.
This uses 2 socket connections between the client and the server and the server
itself is multi-threaded allowing overlap of disk and network operations.
The data is pushed on the data socket until end of file is reached or an error
occurs. The transfer can be interrupted by sending a packet on the control
socket.
Default is RFIO_READBUF.
The default internal buffer size is 128kB, but the buffer size can be set with an entry RFIO IOBUFSIZE in shift.conf or thru the environment variable RFIO_IOBUFSIZE.
If set to RFIO_RETRYIT, there will be retries on failing connect. The number of retries is given by the environment variable RFIO_CONRETRY or the RFIO CONRETRY entry in shift.conf. The retry interval (in seconds) is given by the environment variable RFIO_CONRETRYINT or the RFIO CONRETRYINT entry.
If set to RFIO_NOTIME2RETRY, there will be no retry on failing connect.
Default is RFIO_RETRYIT.
The len argument is ignored.
s is the file descriptor of the receiving socket.
bufsize is the size of the readahead buffer to be used.