Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 07 2018 13:58
    @tobz banned @SoniEx2
  • Aug 01 2018 23:32

    carllerche on gh-pages

    Documentation for tokio-rs/toki… (compare)

  • Aug 01 2018 23:29

    carllerche on master

    Deprecate tokio-proto. (#209) (compare)

  • Aug 01 2018 23:29
    carllerche closed #209
  • Aug 01 2018 19:10
    tobz commented #207
  • Aug 01 2018 19:08
    tobz synchronize #209
  • Aug 01 2018 19:00
    tobz commented #209
  • Aug 01 2018 19:00
    tobz opened #209
  • Jul 26 2018 14:13
    upsuper opened #208
  • Jul 20 2018 03:16
    driftluo edited #207
  • Jul 20 2018 03:15
    driftluo opened #207
  • Jun 15 2018 13:04
    ignatenkobrain opened #206
  • Jun 12 2018 01:41
    rphmeier commented #205
  • Jun 12 2018 01:41
    rphmeier edited #205
  • Jun 12 2018 01:40
    rphmeier commented #205
  • Jun 12 2018 01:40
    rphmeier closed #205
  • Jun 12 2018 01:40
    rphmeier commented #205
  • Jun 12 2018 01:40
    rphmeier commented #205
  • Jun 12 2018 01:36
    rphmeier opened #205
  • Jun 01 2018 13:55
    flosse commented #202
Simon Paitrault
@Freyskeyd

Hello,

I'm trying to create a struct that can hold a both a tokio::io::WriteHalf<tokio_rustls::server::TlsStream<tokio::net::TcpStream>> and a tokio::io::WriteHalf<tokio::net::TcpStream> but I can't find any wait to do it...

Do you have any advice around this kind of issue?
madmaxio
@madmaxio
Better to ask this on discord
Kelly Thomas Kline
@kellytk
@habnabit:matrix.org @vi as you can see, the Tokio team requires that chat be through a proprietary and predatory service, Discord. This is obviously harmful to the ecosystem. Would you or any others like to make a more accessible chat for Tokio users? You're welcome to PM me
For example, I'd like to discuss async fn run<F>(self, handler: F) -> Result<(), Error> -> async fn run<F, Fut>(self, handler: F) -> Result<(), Error> from https://tokio.rs/blog/2021-05-14-inventing-the-service-trait# however I currently have no way to
Vitaly Shukela
@vi
@kellytk Maybe Github Discussions would also be fine for that?
Kelly Thomas Kline
@kellytk
It's different than real-time and yet another proprietary service ran by M$ and no doubt harvesting user data with reckless abandon
Kelly Thomas Kline
@kellytk
What I'd prefer is a Mattermost or Zulip instance. I'd offer to sponsor the VPS fee and perform the minimal sysadmin work, FWIW
Vitaly Shukela
@vi
Which minimal Windows version does Tokio support?
madmaxio
@madmaxio
Better ask on discord, but it is standard rust dependencies
Doowonee
@doowonee
Hello guys. I came here for asking something. Is there any example how to use tcp client inside tcp server loop like p2p? What should i do if server has own client to connect other server?
madmaxio
@madmaxio
Try ask on discord
Vitaly Shukela
@vi
Is Tokio version 0.1 maintained? Should bugs that prevent old tokio-0.1-based (or maybe tokio-core-based) code from building on modern rustc versions be fixed?
Michal 'vorner' Vaner
@vorner
(I'm not a tokio maintainer/dev, so take with grain of salt) You probably could ask on the github as a better place, but I would expect a PR that fixes that to be accepted and new release to be rolled out ‒ even if the old stuff would be considered "not maintained" officially.
Vitaly Shukela
@vi

"The following methods are not cancellation safe because they use a queue for fairness and cancellation makes you lose your place in the queue: ..."

Does it mean it would deadlock or that just it would not respect fairness?

Anders Blenstrup-Pedersen
@KatsuoRyuu
I am working with Tokyo inside some functions where i need to "block" the executions until I get a response from another API.
My understanding is task block_in_place vs spawn_blocking is that block_in_place is executed in a similar fashion as .await will work on a async function (allowing other futures to continue running), where spawn blocking is creating a new thread blocking everything on that thread?! Is my assumption/understanding correct?
Vesa Vilhonen
@vvilhonen
hey, how do I set TCP KEEPALIVE currently on tokio TcpStream? I see that it used to be a method but not anymore for some reason
shekhinah
@she:khinah.xyz
[m]
Is there a matrix bridge to the discord server? I can't get a discord account because discord thinks I'm suspicious and wants me to "verify myself" via sms. I don't want to get a phone just because people think it's a good idea to verify a human by sending them a sms...
madmaxio
@madmaxio
I guess people on discord might be aware of this.
Frederik Bosch
@frederikbosch
Hello. I have an application that is serving an API on HTTP with warp, and this receives tasks which I then send via mpsc to another 'task thread' (thread::spawn). When I have a long task running in that task thread, I cannot reach the HTTP API (my health endpoint reports its down). This suggests me I am running one thread only. Am I? I am still on tokio 1.7 (full feature enabled) but upgrading should not be a problem. What could be going on here?
dcomp
@dcomp:matrix.org
[m]
Is it possible to spawn and poll a future once on the current thread to see if it returns immediately? Calling from a non tokio thread?
Similar to block in place but tick in place
Vitaly Shukela
@vi
@dcomp:matrix.org , Maybe it can be worked around with futures::future::FutureExt::now_or_never somehow?
ancorehraq
@ancorehraq
Is there a way to guarantee that a task tree runs on a specific dedicated thread? I'm juggling multiple network namespaces, and it would get "interesting" if say TcpListener switched threads between resolving addresses and binding
madmaxio
@madmaxio
Try ask on discord.
Ben Burk
@benburk
How can I do a non-blocking read on a websocket connection?
madmaxio
@madmaxio
Check warp and tokio-tungstenite crates
Yousuf Jawwad
@debuggerpk
The problem I am having with framed read is that whenever I send two frames in a go, the codec reads the two frames as if they are one. My Implementation is
  async fn handle(connection: Connection) -> Result<(), SyntheticError> {
    let mut framed = Framed::new(connection.stream, SyntheticFrameCodec::new());
    let mode = Mode::Unauthenticated;
    framed
      .send(SyntheticFrame::ServerGreeting(ServerGreetingFrame::with_mode(mode)))
      .await?;
    // I should be able to different frames and get it decoded.
    framed
      .send(SyntheticFrame::SetUpResponse(SetupResponseFrame::with_mode(mode)))
      .await?;

    while let Some(message) = framed.next().await {
      match message {
        Ok(bytes) => println!("bytes: {:?}", bytes),
        Err(err) => Err(err)?,
      }
    }

    Ok(())
  }
on the reciever end, my implementation is
  pub async fn connect() -> Result<(), SyntheticError> {
    let addr = "127.0.0.1:9000".parse::<SocketAddr>().unwrap();
    let stream = TcpStream::connect(addr).await?;
    let mut framed = SyntheticFrameCodec::new().framed(stream);

    while let Some(frame) = framed.next().await {
      match frame {
        Ok(f) => debug!("Recieved Frame: {:?}", f),
        Err(err) => Err(err)?,
      }
    };
    Ok(())
  }
When I send one frame, I am okay .. meaning I comment out the second frame, my code works for client .. but as soon as there are two frames, my codec panics .. The frames I am sending is of different size
Yousuf Jawwad
@debuggerpk
Inspecting via wire shark ... I can confirm that two packets are send seperately
Alberto
@albertoortiz
Hi, is it possible to connect with UDPSocket to an IP that is not the local one? 127.0.0.1 I can't make this to work, let maybe_udp_socket = UdpSocket::bind("10.18.13.44:3000"); The server works, I tested with other client, but the Rust version always return error kind: AddrNotAvailable any idea? thank you!
1 reply
Jason Nordwick
@jason-assc
ugh gitter
I'm getting the main in tokio not found error, but have features = full part.
tokio = { version = "1.17.0", features = ["full"] }
[E0433] failed to resolve: could not find `main` in `tokio`. 
[Note] could not find `main` in `tokio`
shit this is old
Peter S. Housel
@housel
You might try asking in Discord
sebk
@sebk:matrix.org
[m]
I have a task that never runs... any ideas how to debug this?
the task is created via async move in function in a different crate
and then tokio::rt::spawn(task_creation_function())
actually. writing this and looking at the function signature solved it..
madmaxio
@madmaxio
Active discussions are now on discord
sebk
@sebk:matrix.org
[m]
hm. I don't think I am going to put up with discord.
Anthony Bondarenko
@Yneth
Hi, everyone, what kind of questions are allowed here?
Peter S. Housel
@housel
You should try asking on Discord
Vitaly Shukela
@vi
Can there be high-priority and low-priority Tokio tasks? Can a low-priority task be simulated by periodically calling yield_now?
madmaxio
@madmaxio
Go to discord, not an active channel here
Vitaly Shukela
@vi

Too many mentions of Discord here.

Where should anonymous-ish (or banned on Discord, or disagreeing with Discord's ToS) users discuss Tokio in real time?

Are there public read-only archives of Discord-based Tokio discussions posted somewhere?