Fortinet white logo
Fortinet white logo

Script Reference Guide

TCP:receive()

TCP:receive()

Allows you to get data from a TCP connection.

Syntax

TCP:receive(size)

Arguments

Name Description

size

The data size that you want to get from a TCP connection.

Events

Applicable in the following events:

  • STREAM_REQUEST_DATA

  • STREAM_RESPONSE_DATA

Example

when STREAM_REQUEST_DATA { 
    local header = TCP:receive(20) 
}

Supported Version

FortiADC version 6.1.1 and later.

TCP:receive()

TCP:receive()

Allows you to get data from a TCP connection.

Syntax

TCP:receive(size)

Arguments

Name Description

size

The data size that you want to get from a TCP connection.

Events

Applicable in the following events:

  • STREAM_REQUEST_DATA

  • STREAM_RESPONSE_DATA

Example

when STREAM_REQUEST_DATA { 
    local header = TCP:receive(20) 
}

Supported Version

FortiADC version 6.1.1 and later.