Main Content

flush

Clear UDP socket buffers

    Description

    example

    flush(u) flushes all data from both the input and output buffers of the specified UDP socket.

    flush(u,"input") flushes only the input buffer.

    flush(u,"output") flushes only the output buffer.

    Examples

    collapse all

    Create a udpport object, and clear its buffer.

    Clear only the input buffer.

    u = udpport;
    % ⋮
    flush(u,"input")

    Clear both the input and output buffers.

    flush(u)

    Input Arguments

    collapse all

    UDP socket, specified as a udpport object.

    Example: u = udpport

    Data Types: udpport object

    See Also

    Functions

    Introduced in R2020b