Skip to content

TCP server fails to start listening on windows #5892

Closed
@Seldaek

Description

@Seldaek

Using the following code in windows7 with rustc 0.6, I get:

rustc test.rs && test.exe
Started

And it stays like that forever. It's impossible to telnet to 6380 too.

extern mod std;
use std::net::tcp;
use std::net::ip;
use std::uv;

fn main() {
    io::println("Started");
    let iotask = &uv::global_loop::get();

    do tcp::listen(ip::v4::parse_addr("127.0.0.1"), 6380, 1000, iotask,
        |_kill_ch| {
            io::println("Server is listening");
        }
    ) |_new_conn, _kill_ch| {
        io::println("New client");
    };
}

I am quite new to Rust so if there is any more info I can provide please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions