Skip to content

Commit

Permalink
Merge pull request #296 from Tencent/release/v0.13.0
Browse files Browse the repository at this point in the history
Release/v0.13.0
  • Loading branch information
iyangsj authored Jun 25, 2024
2 parents 00b508f + 2874f9d commit 7c1793c
Show file tree
Hide file tree
Showing 16 changed files with 268 additions and 87 deletions.
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [v0.13.0] - 2024-06-25

### Added
- Add pacing to smooth the flow of packets sent onto the network
- Add more C APIs for the quic connection
- Tweak maximum MTU for paths using IPv4-mapped IPv6 addresses

### Removed
- Remove useless sfv flag in ffi

### Fixed
- Update `stream_bidi_new`/`stream_uni_new` to work like `stream_new`


## [v0.12.0] - 2024-05-27
# Added
### Added
- Buffer disordered zero rtt packets on the server endpoint
- Add dummy congestion controller for testing and expriments
- Tweak configurations and initialization of flow control
- Improve comments of bbr congestion control algorithm
- Add workflow and plot tools for benchmarking
- tquic_tools: tquic_tools: add the `version` option
- tquic_tools: add the `version` option

# Fixed
### Fixed
- Fix dropping datagrams from unknown connections on the client endpoint
- Fix handling restart from idle for bbr/bbr3 algorithms
- tquic_tools: resolve minor issues
Expand Down Expand Up @@ -232,6 +246,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Provide example clients and servers.


[v0.13.0]: https://github.com/tencent/tquic/compare/v0.12.0...v0.13.0
[v0.12.0]: https://github.com/tencent/tquic/compare/v0.11.0...v0.12.0
[v0.11.0]: https://github.com/tencent/tquic/compare/v0.10.0...v0.11.0
[v0.10.0]: https://github.com/tencent/tquic/compare/v0.9.0...v0.10.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tquic"
version = "0.12.0"
version = "0.13.0"
edition = "2021"
rust-version = "1.70.0"
license = "Apache-2.0"
Expand Down
1 change: 1 addition & 0 deletions cbindgen.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ exclude = ["MAX_CID_LEN", "MIN_CLIENT_INITIAL_LEN"]
"TlsConfig" = "quic_tls_config_t"
"SslCtx" = "SSL_CTX"
"Connection" = "quic_conn_t"
"ConnectionStats" = "quic_conn_stats_t"
"Endpoint" = "quic_endpoint_t"
"PacketOutSpec" = "quic_packet_out_spec_t"
"PacketInfo" = "quic_packet_info_t"
Expand Down
47 changes: 46 additions & 1 deletion include/tquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,36 @@ typedef struct quic_path_address_t {
socklen_t remote_addr_len;
} quic_path_address_t;

/**
* Statistics about a QUIC connection.
*/
typedef struct quic_conn_stats_t {
/**
* Total number of received packets.
*/
uint64_t recv_count;
/**
* Total number of bytes received on the connection.
*/
uint64_t recv_bytes;
/**
* Total number of sent packets.
*/
uint64_t sent_count;
/**
* Total number of bytes sent on the connection.
*/
uint64_t sent_bytes;
/**
* Total number of lost packets.
*/
uint64_t lost_count;
/**
* Total number of bytes lost on the connection.
*/
uint64_t lost_bytes;
} quic_conn_stats_t;

typedef struct http3_methods_t {
/**
* Called when the stream got headers.
Expand Down Expand Up @@ -319,7 +349,7 @@ void quic_config_set_max_handshake_timeout(struct quic_config_t *config, uint64_
*/
void quic_config_set_recv_udp_payload_size(struct quic_config_t *config, uint16_t v);

/*
/**
* Enable the Datagram Packetization Layer Path MTU Discovery
* default value is true.
*/
Expand Down Expand Up @@ -792,6 +822,11 @@ bool quic_conn_path_iter_next(struct quic_path_address_iter_t *iter, struct quic
*/
bool quic_conn_active_path(const struct quic_conn_t *conn, struct quic_path_address_t *a);

/**
* Return statistics about the connection.
*/
const struct quic_conn_stats_t *quic_conn_stats(struct quic_conn_t *conn);

/**
* Return the trace id of the connection
*/
Expand All @@ -805,8 +840,18 @@ bool quic_conn_is_draining(struct quic_conn_t *conn);
/**
* Check whether the connection is closing.
*/
bool quic_conn_is_closing(struct quic_conn_t *conn);

/**
* Check whether the connection is closed.
*/
bool quic_conn_is_closed(struct quic_conn_t *conn);

/**
* Check whether the connection was closed due to handshake timeout.
*/
bool quic_conn_is_handshake_timeout(struct quic_conn_t *conn);

/**
* Check whether the connection was closed due to idle timeout.
*/
Expand Down
1 change: 1 addition & 0 deletions src/congestion_control/congestion_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub use cubic::Cubic;
pub use cubic::CubicConfig;
pub use dummy::Dummy;
pub use hystart_plus_plus::HystartPlusPlus;
pub use pacing::Pacer;

/// Available congestion control algorithms.
#[repr(C)]
Expand Down
Loading

0 comments on commit 7c1793c

Please sign in to comment.