Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: move to a Boxed Adapter #324

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9553267
feat(socketio/extensions): use `RwLock<HashMap>` rather than `DashMap`
Totodore Apr 19, 2024
46c7a1b
chore(bench): add bencher ci
Totodore Apr 19, 2024
d7d6a3f
fix: socketioxide benches with `Bytes`
Totodore Apr 19, 2024
c307a73
chore(bench): fix ci name
Totodore Apr 19, 2024
2894317
chore(bench): add RUSTFLAG for testing
Totodore Apr 19, 2024
44d73ba
fix: engineioxide benches
Totodore Apr 19, 2024
191e3fa
chore(bench): remove matrix test
Totodore Apr 19, 2024
66aeef9
chore(bench): add groups
Totodore Apr 19, 2024
82fefb5
chore(bench): improve extensions bench
Totodore Apr 19, 2024
3652d0a
Merge branch 'bencher' into feat-extensions-rework
Totodore Apr 20, 2024
df530f1
Merge branch 'main' into feat-extensions-rework
Totodore Apr 20, 2024
164a7ae
feat(socketio/extract): refactor extract mod
Totodore Apr 20, 2024
f6008a5
feat(socketio/extract): add `(Maybe)(Http)Extension` extractors
Totodore Apr 20, 2024
ecff81a
docs(example): update examples with `Extension` extractor
Totodore Apr 20, 2024
5070dd0
test(socketio/extract): add tests for `Extension` and `MaybeExtension`
Totodore Apr 20, 2024
a744f7b
docs(example) fmt chat example
Totodore Apr 20, 2024
bf8daab
Merge branch 'main' into feat-extensions-rework
Totodore Apr 20, 2024
f7106db
Merge branch 'main' into feat-extensions-rework
Totodore Apr 21, 2024
50372f2
test(socketio): fix extractors test
Totodore Apr 21, 2024
76c72ca
doc(socketio): improve doc for socketioxide
Totodore Apr 21, 2024
df94f5c
test(socketio): increase timeout
Totodore Apr 21, 2024
5888b37
Merge branch 'main' into feat-extensions-rework
Totodore May 6, 2024
1805c10
Merge branch 'main' into feat-extensions-rework
Totodore May 10, 2024
d5c01f7
doc(socketio): improve doc
Totodore May 21, 2024
afed9fb
feat(adapter): remove adapter generic param and use boxed
Totodore May 24, 2024
3c1e54a
Merge branch 'main' into ft-boxed-adapter
Totodore Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions socketioxide/src/ack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use serde::de::DeserializeOwned;
use serde_json::Value;
use tokio::{sync::oneshot::Receiver, time::Timeout};

use crate::{adapter::Adapter, errors::AckError, extract::SocketRef, packet::Packet, SocketError};
use crate::{errors::AckError, extract::SocketRef, packet::Packet, SocketError};

/// An acknowledgement sent by the client.
/// It contains the data sent by the client and the binary payloads if there are any.
Expand Down Expand Up @@ -145,9 +145,9 @@ impl AckInnerStream {
///
/// The [`AckInnerStream`] will wait for the default timeout specified in the config
/// (5s by default) if no custom timeout is specified.
pub fn broadcast<A: Adapter>(
pub fn broadcast(
packet: Packet<'static>,
sockets: Vec<SocketRef<A>>,
sockets: Vec<SocketRef>,
duration: Option<Duration>,
) -> Self {
let rxs = FuturesUnordered::new();
Expand Down Expand Up @@ -312,13 +312,13 @@ mod test {
use engineioxide::sid::Sid;
use futures_util::StreamExt;

use crate::{adapter::LocalAdapter, ns::Namespace, socket::Socket};
use crate::{ns::Namespace, socket::Socket};

use super::*;

fn create_socket() -> Arc<Socket<LocalAdapter>> {
fn create_socket() -> Arc<Socket> {
let sid = Sid::new();
let ns = Namespace::<LocalAdapter>::new_dummy([sid]).into();
let ns = Namespace::new_dummy([sid]).into();
let socket = Socket::new_dummy(sid, ns);
socket.into()
}
Expand Down
Loading