ILXStream

new ILXStream()

Since:
  • BIP-IP TMOS 13.0

An ILXStream is an extended instance of the net.Socket object. A client and server stream are created for each ` <ILXFlow.html>`__

ILXFlow

. All data that goes through the socket goes through the Big IP TMM and not the Linux TCP stack. A plugin may also use ` <#connect>`__

ILXStream.connect()

to initiate outbound connections that go directly through the TMM.

Properties:

Name Type Description
remoteAddress
string Is client address on clientside stream. Is server destination address on serverside stream.
remotePort
number Is client source port on clientside. Is server destination port on serverside.
remoteFamily
string IPV4 or IPV6 on respective stream.
localAddress
string Is VS address on clientside. Is source address on severside.
localPort
number Is VS port on clientside. Is source port on serverside.

Example:

 plugin.on('connect', function(flow) {
   // Received HTTP request headers from client
   flow.client.on('requestStart', function(request) {
     request.setHeader('X-F5-ILX', 'Success');
   });
});

Methods

allow()

(ILXFlow.client object only) Allows the client connection to proceed to the server. ` <ILXPluginOptions.html>`__

ILXPluginOptions.handleClientOpen

must be set to

true

and no data may have been sent to the server before ILXStream.allow is called.

connect(options)

Establish a TCP connection to the specified host or Virtual Server. A host or virtualServer must be specified, but not both.

Note: This method overides the default

net.Socket.connect

method and does not do DNS lookups of the hostname.

Parameters:

Name Type Description
options
object

Propertie

s
name:properties-

1

Nam e Typ e Des cri pti on
hos t str ing IP add res s for the sys tem to con nec t to. The add res s may con tai n a rou te dom ain qua lif ier , exa mpl e: 10. 10. 0.1 %5.
por t int ege r IP por t
vir tua lSe rve r str ing The sys tem wil l att emp t to con nec t to the vir tua l ser ver . If spe cif ied thi s mus t be a ful ly qua lif ied nam e, exa mpl e: /Co mmo n/m yVi p.
vir tua lPr oto col Sta ck str ing To est abl ish a con nec tio n the sys tem use s the ser ver sid e pro toc ol sta ck of a vir tua l ser ver ass oci ate d wit h the cur ren t ILX Plu gin . Thi s set tin g all ows the dev elo per to sel ect whi ch vir tua l ser ver wil l be use d to bui ld the pro toc ol sta ck. The spe cif ied vir tua l ser ver mus t be ass oci ate d wit h the cur ren t ILX plu gin via an ILX Pro fil e. If a vir tua lPr oto col Sta ck is not spe cif ied one wil l be sel ect ed. Not e tha t thi s opt ion is ind epe nde nt of the hos t and vir tua lSe rve r opt ion s.
dis abl eSs l boo lea n If an SSL pro fil e is pre sen t on the ser ver sid e of the vir tua l ser ver thi s set tin g can be use d to dis abl e SSL for a plu gin ini tia ted con nec tio n.

setTraceLevel(level)

Set the trace level for the stream.

Parameters:

Name Type Description
level
number

See ` <ILXPlugin.html#~tr aceLevel>`__

ILXPlugin~traceLev

el

tmmId()→ {number}

Returns the ID of the TMM that is handling the stream.

Returns:

Type Description
number TMM ID

traceLevel()→ {number}

Returns the trace level for the stream.

Returns:

Type Description
number The current trace level

Events

connect

(ILXFlow.server object only) The

connect

event is emitted when the connection to the server is established. Note: Because some of the parameters are unique to F5 the ILXStream.connect signature does not match the Node.js net.Socket connect signature.

error

The error event is emitted when a stream error is detected.

Parameters:

Name Type Description
errorText
string Description of the error

requestComplete

(ILXFlow.client object only) The requestComplete event is emitted after the body of a request has been received. This event is only emitted if there is an HTTP profile on the virtual server.

Parameters:

Name Type Description
request
ILXTransaction ILXTransaction instance object

Listeners of This Event:

requestStart

(ILXFlow.client object only) The requestStart event is emitted when pre-parsed client HTTP request headers are available. This event is only emitted if there is an HTTP profile on the virtual server.

Parameters:

Name Type Description
request
ILXTransaction ILXTransaction instance object

Listeners of This Event:

responseComplete

(ILXFlow.server object only) The responseDone event is emitted after the body of a response has been received. This event is only emitted if there is an HTTP profile associated with the virtual server.

Parameters:

Name Type Description
response
ILXTransaction ILXTransaction instance object

Listeners of This Event:

responseStart

(ILXFlow.server object only) The responseStart event is emitted when pre-parsed HTTP response header values are available. This event is only emitted if there is an HTTP profile associated with the virtual server.

Parameters:

Name Type Description
response
ILXTransaction ILXTransaction instance object

Listeners of This Event: