1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-25 15:43:13 +03:00
Files
mvfst/quic/state/SimpleFrameFunctions.h
Luca Niccolini e39bf5f447 parse and write DATAGRAM Frames
Summary: This diff is the encode and decode support of Datagram frame.

Reviewed By: mjoras, yangchi

Differential Revision: D20983883

fbshipit-source-id: 1a72a87e6ce3601b71fececca872a9d20bf7820e
2021-05-04 10:53:00 -07:00

54 lines
1.3 KiB
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
#pragma once
#include <quic/codec/Types.h>
#include <quic/state/StateData.h>
namespace quic {
/*
* Initiate a send of the given simple frame.
*/
void sendSimpleFrame(QuicConnectionStateBase& conn, QuicSimpleFrame frame);
/*
* Update connection state and the frame on clone of the given simple frame.
* Returns the updated simple frame.
*/
folly::Optional<QuicSimpleFrame> updateSimpleFrameOnPacketClone(
QuicConnectionStateBase& conn,
const QuicSimpleFrame& frame);
/*
* Update the connection state after sending the given simple frame.
*/
void updateSimpleFrameOnPacketSent(
QuicConnectionStateBase& conn,
const QuicSimpleFrame& simpleFrame);
/*
* Update the connection state after loss of a given simple frame.
*/
void updateSimpleFrameOnPacketLoss(
QuicConnectionStateBase& conn,
const QuicSimpleFrame& frame);
/*
* Update the connection state on receipt of the given simple frame.
* Returns true if the frame is NOT a probing frame
*/
bool updateSimpleFrameOnPacketReceived(
QuicConnectionStateBase& conn,
const QuicSimpleFrame& frameIn,
PacketNum packetNum,
bool fromChangedPeerAddress);
} // namespace quic