ReceiveOutOfBandFromSpecificClient Method

Overview

Type:

Method

Available as of:

V1.0.4.0

Task

Reads OutOfBand data stored in the receive buffer of the client specified by its source IP and port.

Functional Description

Reads OutOfBand data stored in the receive buffer of the client specified by its source IP and port 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_sClientIP

STRING(15)

-

IP address of the connected client the data is to be read from.

i_uiClientPort

UINT

1 ... 65535

Source port of the connected client the data is to be read from.

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.

Used by

  • FB_TCPServer