Skip to content

TcpListener::bind, etc. may block #50

Closed
@ExoticMatter

Description

@ExoticMatter

TCP/UDP listeners and streams take A: std::net::ToSocketAddrs. Some ToSocketAddrs impls will resolve domain names. However, ToSocketAddrs is not futures-aware, so DNS lookups are synchronous.

Possible solutions:

  • Spawn a blocking task a la filesystem operations (simpler)
  • Replace ToSocketAddrs with an async version (probably more efficient)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersmentoredIssues where we provide mentoring

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions