avi.l4.read

DataScript

Function avi.l4.read()
Description Starting with Avi Vantage release 18.2.5, the function avi.vs.read has been renamed as avi.l4.read.
Reads the payload from the socket buffers and returns stream of bytes.
This API is a must to read the payload and operate on it.
The number of bytes that can be read cannot exceed 65000. This API can be used in conjunction with `avi.l4.collect`. If enough number of bytes are not present in the socket, the API will error out.
Events VS_DATASCRIPT_EVT_L4_REQUEST
VS_DATASCRIPT_EVT_L4_RESPONSE
Parameter Number of bytes
Returns Returns the payload after L4 (TCP/UDP) as stream of bytes
Example

payload = avi.l4.read() - Reads all bytes from socket buffer
payload = avi.l4.read(10) - Reads 10 bytes from socket buffer
payload = avi.l4.read(0) - Reads all bytes from socket buffer