Skip to content

feat(engineio-client): wip Stream + Sink based client implementation #555

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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Totodore
Copy link
Owner

@Totodore Totodore commented Aug 3, 2025

No description provided.

@Totodore Totodore added A-engineioxide Area related to engineioxide A-core Area related to socketioxide-core P-Low Low priority C-Feature-request Request for a feature labels Aug 3, 2025
@Totodore Totodore changed the title feat(engineio-client): wip Stream + Sink based client implementation feat(engineio-client): wip Stream + Sink based client implementation Aug 3, 2025
self.tx.try_send(packets)
}

fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {

Check warning

Code scanning / clippy

unused variable: cx Warning

unused variable: cx
Poll::Ready(Ok(()))
}

fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {

Check warning

Code scanning / clippy

unused variable: cx Warning

unused variable: cx
}
}

fn start_send(self: Pin<&mut Self>, item: Packet) -> Result<(), Self::Error> {

Check warning

Code scanning / clippy

unused variable: item Warning

unused variable: item
#[cfg(feature = "tracing")]
tracing::trace!(post_state = ?self.post_state, "sending packet");

let body = match &self.post_state {

Check warning

Code scanning / clippy

unused variable: body Warning

unused variable: body
}
PostState::Pending { ref mut fut } => {
match poll!(unsafe { Pin::new_unchecked(fut) }.poll(cx)) {
Ok(res) => {

Check warning

Code scanning / clippy

unused variable: res Warning

unused variable: res
}

impl<F> PollState<F> {
fn get_decoding(self) -> Pin<Box<dyn Stream<Item = Result<Packet, PacketParseError>>>> {

Check warning

Code scanning / clippy

method get_decoding is never used Warning

method get\_decoding is never used
@@ -0,0 +1,85 @@
use std::str::FromStr;

Check warning

Code scanning / clippy

unused import: std::str::FromStr Warning test

unused import: std::str::FromStr
use engineioxide::{DisconnectReason, service::EngineIoService};
use engineioxide::{Socket, Str};
use engineioxide_client::{Client, HttpClient};
use engineioxide_core::{Packet, Sid};

Check warning

Code scanning / clippy

unused import: Packet Warning test

unused import: Packet
use engineioxide::{Socket, Str};
use engineioxide_client::{Client, HttpClient};
use engineioxide_core::{Packet, Sid};
use futures_util::{StreamExt, TryFutureExt};

Check warning

Code scanning / clippy

unused import: TryFutureExt Warning test

unused import: TryFutureExt
let svc = EngineIoService::new(Arc::new(handler));
let client = Client::connect(svc).await.unwrap();
assert_eq!(rx.recv().await.unwrap(), Event::Connect(client.sid));
let (ctx, mut crx) = client.split();

Check failure

Code scanning / clippy

type annotations needed Error test

type annotations needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area related to socketioxide-core A-engineioxide Area related to engineioxide C-Feature-request Request for a feature P-Low Low priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant