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

Hyper-util on xtensa esp32 #516

Open
lorenzo-pirchio opened this issue Jun 11, 2024 · 1 comment
Open

Hyper-util on xtensa esp32 #516

lorenzo-pirchio opened this issue Jun 11, 2024 · 1 comment

Comments

@lorenzo-pirchio
Copy link

lorenzo-pirchio commented Jun 11, 2024

I'm trying to use hyper-util and hyper on esp32s3 but I have these errors, can anyone help me?

error[E0599]: no method named with_interval found for struct TcpKeepalive in the current scope
--> C:\Users\lpirc.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.5\src\client\legacy\connect\http.rs:114:12
|
114 | ka.with_interval(interval)
| ^^^^^^^^^^^^^ method not found in TcpKeepalive

error[E0599]: no method named with_retries found for struct TcpKeepalive in the current scope
--> C:\Users\lpirc.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.5\src\client\legacy\connect\http.rs:130:12
|
130 | ka.with_retries(retries)
| ^^^^^^^^^^^^ help: there is a method with a similar name: with_time

In crate socket, espidf is not supported for these two methods as can be seen below, what should I do?

#[cfg(any(
target_os = "android",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "fuchsia",
target_os = "illumos",
target_os = "ios",
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
target_os = "windows",
target_os= "espidf"
))]
#[cfg_attr(
docsrs,
doc(cfg(any(
target_os = "android",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "fuchsia",
target_os = "illumos",
target_os = "ios",
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "tvos",
target_os = "watchos",
target_os = "windows",
target_os= "espidf"
)))
)]
pub const fn with_interval(self, interval: Duration) -> Self {
Self {
interval: Some(interval),
..self
}
}

/// Set the value of the `TCP_KEEPCNT` option.
///
/// Set the maximum number of TCP keepalive probes that will be sent before
/// dropping a connection, if TCP keepalive is enabled on this socket.
#[cfg(all(
    feature = "all",
    any(
        target_os = "android",
        target_os = "dragonfly",
        target_os = "freebsd",
        target_os = "fuchsia",
        target_os = "illumos",
        target_os = "ios",
        target_os = "linux",
        target_os = "macos",
        target_os = "netbsd",
        target_os = "tvos",
        target_os = "watchos",
    )
))]
#[cfg_attr(
    docsrs,
    doc(cfg(all(
        feature = "all",
        any(
            target_os = "android",
            target_os = "dragonfly",
            target_os = "freebsd",
            target_os = "fuchsia",
            target_os = "illumos",
            target_os = "ios",
            target_os = "linux",
            target_os = "macos",
            target_os = "netbsd",
            target_os = "tvos",
            target_os = "watchos",
        )
    )))
)]
pub const fn with_retries(self, retries: u32) -> Self {
    Self {
        retries: Some(retries),
        ..self
    }
}

}

@Thomasdezeeuw
Copy link
Collaborator

We don't support this target. Adding support for it would be welcome though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants