Skip to content

more work on net::tcp and net::ip #2731

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

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
498b3ff
Register snapshots.
msullivan Jun 29, 2012
7aa43b2
Make fmt use a bitmask instead of a vector of flags. Closes #1993.
msullivan Jun 29, 2012
f1f34b6
std: kludge export of net_ip in std.rc until submodule export is sorted
olsonjeffery May 27, 2012
691eb97
std: import/export cleanup in net_tcp
olsonjeffery May 27, 2012
bec5cf2
std: mod cleanup, impl/test for conn. refused err + mem leak fix
olsonjeffery May 28, 2012
178a42e
std: dump the tcp::new_listener server API
olsonjeffery May 29, 2012
ae22268
std: some cleanup in net::tcp rename listen_to_conn->listen
olsonjeffery May 29, 2012
f2df66d
std: factor main body of tcp::listen into reusable listen_common
olsonjeffery May 29, 2012
0ca1eca
std: EADDRINUSE and EACCES err tests for tcp server + more cleanup
olsonjeffery Jun 5, 2012
aa47692
std: doc and misc cleanup in net::tcp
olsonjeffery Jun 5, 2012
03c661d
core: export vec::unshift
olsonjeffery Jun 7, 2012
0b7302f
std: add buffered wrapper to tcp_socket + io::reader impl. no tests, …
olsonjeffery Jun 7, 2012
d9ff6e9
std: rework signature of tcp::write common impl to make io::writer po…
olsonjeffery Jun 8, 2012
2c890a1
std: finish impl of io::writer for tcp_socket_buf
olsonjeffery Jun 8, 2012
4acbe36
std: renaming impl for tcp_socket and reshuffle/cleanup for tcp_socke…
olsonjeffery Jun 8, 2012
03f64fe
core: adding str::as_slice .. most likely broken
olsonjeffery Jun 10, 2012
57931c0
std: test impl for using tcp_socket_buf and its reader/writer impls. …
olsonjeffery Jun 10, 2012
756d0d0
core: str::as_slice is unneeded, yay! fixes std::net::tcp socket_buf …
olsonjeffery Jun 10, 2012
76d4eb1
rt: add remaining ip string parser/formatter helpers from uv
olsonjeffery Jun 12, 2012
7455ead
std: mapping additional libuv ip string helpers.. add test for sockad…
olsonjeffery Jun 12, 2012
e1c7b30
std: adding uv::ll::ip4_name and refactored net::ip to use it
olsonjeffery Jun 18, 2012
01ab1b1
std: getting uv_ip6_* utils working in uv::ll
olsonjeffery Jun 18, 2012
37f58e9
std: adding net::ip::v6 utils and rudimentary tests, huzzah! (see cav…
olsonjeffery Jun 18, 2012
88f9f04
rt: more sizeof helpers + misc consts for uv_getaddrinfo
olsonjeffery Jun 20, 2012
75a1295
std: mapped addrinfo, addr_in and uv_getaddrinfo_t as rust records
olsonjeffery Jun 20, 2012
475361e
rt: more helper functions to get uv_getaddrinfo going
olsonjeffery Jun 22, 2012
e3d7764
std: wire-up low-level bindings to libuv's uv_getaddrinfo API and fri…
olsonjeffery Jun 22, 2012
d3baed6
std: roughcut impl of net::ip::get_addr()
olsonjeffery Jun 22, 2012
de31f78
fix typo in rustrt.def.in
olsonjeffery Jun 22, 2012
2849071
WIP set aside unshift
olsonjeffery Jun 23, 2012
aeeb8b4
rt: adding uv_freeaddrinfo binding and tweek signature for uv_getaddr…
olsonjeffery Jun 25, 2012
21ee11a
std: net::ip::get_addr is working w/ happy path test. needs more.
olsonjeffery Jun 25, 2012
5c32294
rt: whitespace cleanup in rust_uv
olsonjeffery Jun 26, 2012
cb15e78
std: whitespace/comment clean
olsonjeffery Jun 26, 2012
cdf8fd0
rt: get rid of unused helpers for AF_INET and add bool-based ones, in…
olsonjeffery Jun 26, 2012
96c3658
std: add uv::ll::is_ipv6_addrinfo and get_INADDR_NONE
olsonjeffery Jun 26, 2012
d5ffb7f
std: beef up ipv4 validation a bit
olsonjeffery Jun 26, 2012
757f74b
std: add test for net::ip::get_addr failure
olsonjeffery Jun 26, 2012
b60e3e9
std: addressing #2656 (ipv6 support in net::tcp)
olsonjeffery Jun 26, 2012
95c41f2
std: fix errors from recent rebase and vec expr/type syntax update
olsonjeffery Jun 26, 2012
2ce9281
rename net::ip tests en masse
olsonjeffery Jun 26, 2012
9fa68d3
std/rt: cleanup and adding sockaddr_in6 mapping for win32
olsonjeffery Jun 27, 2012
d3d810a
std: cleanups, post-rebase
olsonjeffery Jun 27, 2012
fd6f455
std: adding some basic docs for net::ip::get_addr
olsonjeffery Jun 27, 2012
12d388e
std: uv::ll fixes for 32bit linux
olsonjeffery Jun 29, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mk/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# the snapshot runtime (resp. corelib) rather than the runtime
# (resp. corelib) from the working directory.
USE_SNAPSHOT_RUNTIME=0
USE_SNAPSHOT_CORELIB=0
USE_SNAPSHOT_CORELIB=1
USE_SNAPSHOT_STDLIB=0

define TARGET_STAGE_N
Expand Down
24 changes: 10 additions & 14 deletions src/libcore/extfmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,17 @@ mod ct {
// conditions can be evaluated at compile-time. For now though it's cleaner to
// implement it 0this way, I think.
mod rt {
enum flag {
flag_left_justify,
flag_left_zero_pad,
flag_space_for_sign,
flag_sign_always,
flag_alternate,
}
const flag_none : u32 = 0u32;
const flag_left_justify : u32 = 0b00000000000000000000000000000001u32;
const flag_left_zero_pad : u32 = 0b00000000000000000000000000000010u32;
const flag_space_for_sign : u32 = 0b00000000000000000000000000000100u32;
const flag_sign_always : u32 = 0b00000000000000000000000000001000u32;
const flag_alternate : u32 = 0b00000000000000000000000000010000u32;

enum count { count_is(int), count_implied, }
enum ty { ty_default, ty_bits, ty_hex_upper, ty_hex_lower, ty_octal, }

// FIXME (#1993): May not want to use a vector here for flags; instead
// just use a bool per flag.
type conv = {flags: [flag]/~, width: count, precision: count, ty: ty};
type conv = {flags: u32, width: count, precision: count, ty: ty};

fn conv_int(cv: conv, i: int) -> str {
let radix = 10u;
Expand Down Expand Up @@ -307,7 +305,6 @@ mod rt {
let s = if b { "true" } else { "false" };
// run the boolean conversion through the string conversion logic,
// giving it the same rules for precision, etc.

ret conv_str(cv, s);
}
fn conv_char(cv: conv, c: char) -> str {
Expand Down Expand Up @@ -430,9 +427,8 @@ mod rt {
}
ret padstr + s;
}
fn have_flag(flags: [flag]/~, f: flag) -> bool {
for vec::each(flags) {|candidate| if candidate == f { ret true; } }
ret false;
fn have_flag(flags: u32, f: u32) -> bool {
flags & f != 0
}
}

Expand Down
1 change: 1 addition & 0 deletions src/libcore/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export splitn;
export rsplit;
export rsplitn;
export shift;
export unshift;
export pop;
export push, push_all, push_all_move;
export grow;
Expand Down
Loading