ReceiveOutOfBandFromFirstAvailableClient Method

Overview

Type:

Method

Available as of:

V1.0.4.0

Task

Read OutOfBand data stored in the receive buffer of the first client that has data available to be read.

Functional Description

Reads OutOfBand data stored in the receive buffer of the first client that has data available to be read and removes it from there if it has been read without detecting an error.

The UDINT return value indicates the number of bytes written to the application-provided buffer.

For additional information about the receive methods, refer to section Receive Method.

Interface

Input

Data type

Valid range

Description

i_pbyReceiveBuffer

POINTER TO BYTE

-

Start address of the buffer to write the received data to.

i_udiReceiveBufferSize

UDINT

1 ... 2147483647

Number of bytes to be read.

NOTE: The value must not be greater than the size of the buffer.
NOTE: To prevent access violation caused by invalid pointer access (out of bounds) to the memory, use the arithmetic operator SIZEOF in conjunction with the targeted buffer to determine the value for i_udiReceiveBufferSize.

In_Out

Data type

Valid range

Description

iq_udiFillLevel

UDINT

1 ... 2147483647

Indicates the fill level of the buffer.

Before function call:

Data will be written starting at this offset.

After the function call:

Updated by adding the number of written bytes to the original value.

Output

Data type

Valid range

Description

q_sClientIP

STRING(15)

-

IP address of the client.

q_dwClientIP

DWORD

-

IP address of the client as DWORD; each byte represents one digit of the IPv4 address.

q_uiClientPort

UINT

-

Source port of the client.

Used by

  • FB_TCPServer