beautypg.com

Os_tcp::collect, Example, Description – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual

Page 38: Context, Usage, Input parameters, Return values

background image

26

Brocade Virtual ADX OpenScript API Guide

53-1003243-01

Methods

3

Example

OS_TCP::collect

Description

Returns the TCP data within a TCP packet.

Context

Called in context of TCP.

Usage

Used to trigger the data event (TCP_CLIENT_DATA or TCP_SERVER_DATA).

If the script does not act on the data (e.g. through forwarding), the data is held.

Input Parameters

None.

Return Values

None.

use OS_TCP;

use OS_SLB;

use OS_HTTP_REQUEST;

sub HTTP_REQUEST {

my $optlen = OS_TCP::getOptionLength;

my $options = OS_TCP::options;

if($optlen > 0 && !(defined $options))

{

OS_SLB::reset_client;

}

}