FSocket::RecvFromWithPktInfo

Reads a chunk of data from the socket and gathers the source address and the destination using IP_PKTINFO

Windows
MacOS
Linux

References

Module

Sockets

Header

/Engine/Source/Runtime/Sockets/Public/Sockets.h

Include

#include "Sockets.h"

Source

/Engine/Source/Runtime/Sockets/Private/Sockets.cpp

Syntax

virtual bool RecvFromWithPktInfo
(
    uint8 * Data,
    int32 BufferSize,
    int32 & BytesRead,
    FInternetAddr & Source,
    FInternetAddr & Destination,
    ESocketReceiveFlags::Type Flags
)

Remarks

Reads a chunk of data from the socket and gathers the source address and the destination using IP_PKTINFO

A return value of 'true' does not necessarily mean that data was returned. Callers must check the 'BytesRead' parameter for the actual amount of data returned. A value of zero indicates that there was no data available for reading.

Returns

true on success, false in case of a closed socket or an unrecoverable error.

Parameters

Parameter

Description

Data

The buffer to read into.

BufferSize

The max size of the buffer.

BytesRead

Will indicate how many bytes were read from the socket.

Source

Will contain the receiving the address of the sender of the data.

Destination

Will contain the destination address used by the sender of the data.

Flags

The receive flags.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss