Skip to content

Commit

Permalink
feat(s2n-quic-dc): export event module (#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft authored Oct 31, 2024
1 parent 01cbb44 commit e2ac09e
Show file tree
Hide file tree
Showing 14 changed files with 809 additions and 510 deletions.
14 changes: 14 additions & 0 deletions dc/s2n-quic-dc/events/connection.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#[event("application:write")]
pub struct ApplicationWrite {
/// The number of bytes that the application tried to write
len: usize,
}

#[event("application:write")]
pub struct ApplicationRead {
/// The number of bytes that the application tried to read
len: usize,
}
11 changes: 11 additions & 0 deletions dc/s2n-quic-dc/events/endpoint.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#[event("endpoint:initialized")]
#[subject(endpoint)]
struct EndpointInitialized<'a> {
acceptor_addr: SocketAddress<'a>,
handshake_addr: SocketAddress<'a>,
tcp: bool,
udp: bool,
}
10 changes: 10 additions & 0 deletions dc/s2n-quic-dc/src/event.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#[cfg(any(test, feature = "testing"))]
use s2n_quic_core::event::snapshot;

pub use s2n_quic_core::event::{Event, IntoEvent, Timestamp};

mod generated;
pub use generated::*;
10 changes: 0 additions & 10 deletions dc/s2n-quic-dc/src/event/events.rs

This file was deleted.

Loading

0 comments on commit e2ac09e

Please sign in to comment.