about summary refs log tree commit diff
path: root/src/libstd/rt/io
AgeCommit message (Collapse)AuthorLines
2013-08-18More spelling corrections.Huon Wilson-2/+2
2013-08-16doc: convert remaining uses of core:: to std::.Huon Wilson-1/+1
2013-08-16doc: correct spelling in documentation.Huon Wilson-3/+3
2013-08-12Forbid pub/priv where it has no effectAlex Crichton-2/+2
Closes #5495
2013-08-09auto merge of #8387 : brson/rust/nooldrt, r=brsonbors-1/+2
2013-08-09Remove the C++ runtime. SayonaraBrian Anderson-1/+2
2013-08-09Fix Ipv6Addr to_str for ::1:x.x.x.x addressesStepan Koltsov-1/+8
Reported by luqmana@
2013-08-08auto merge of #8336 : stepancheg/rust/socket-addr-from-str, r=brsonbors-0/+365
FromStr implemented from scratch. It is overengineered a bit, however. Old implementation handles errors by fail!()-ing. And it has bugs, like it accepts `127.0.0.1::127.0.0.1` as IPv6 address, and does not handle all ipv4-in-ipv6 schemes. So I decided to implement parser from scratch.
2013-08-07Add initial support for a new formatting syntaxAlex Crichton-1/+1
The new macro is available under the name ifmt! (only an intermediate name)
2013-08-06auto merge of #8313 : msullivan/rust/cleanup, r=catamorphismbors-1/+1
2013-08-06Implement FromStr for IpAddr and SocketAddrStepan Koltsov-0/+365
Better than that in rt::uv::net, because it: * handles invalid input explicitly, without fail!() * parses socket address, not just IP * handles various ipv4-in-ipv6 addresses, like 2001:db8:122:344::192.0.2.33 (see http://tools.ietf.org/html/rfc6052 for example) * rejects output like `127.0000000.0.1` * does not allocate heap memory * have unit tests
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-2/+36
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-05Get rid of some NOTEs.Michael Sullivan-1/+1
2013-08-04auto merge of #8243 : stepancheg/rust/ipv, r=brsonbors-37/+53
multicast functions now take IpAddr (without port), because they dont't need port. Uv* types renamed: * UvIpAddr -> UvSocketAddr * UvIpv4 -> UvIpv4SocketAddr * UvIpv6 -> UvIpv6SocketAddr "Socket address" is a common name for (ip-address, port) pair (e.g. in sockaddr_in struct). P. S. Are there any backward compatibility concerns? What is std::rt module, is it a part of public API?
2013-08-03remove obsolete `foreach` keywordDaniel Micay-4/+4
this has been replaced by `for`
2013-08-03Rename IpAddr -> SocketAddr, extract IpAddr from SocketAddrStepan Koltsov-37/+53
multicast functions now take IpAddr (without port), because they dont't need port. Uv* types renamed: * UvIpAddr -> UvSocketAddr * UvIpv4 -> UvIpv4SocketAddr * UvIpv6 -> UvIpv6SocketAddr "Socket address" is a common name for (ip-address, port) pair (e.g. in sockaddr_in struct).
2013-08-02replace `range` with an external iteratorDaniel Micay-5/+5
2013-08-01modified local to include an implementation for try_unsafe_borrow::<Task> so ↵toddaaro-2/+2
that the log methods will work
2013-08-01minor tweaks - unboxed the coroutine so that it is no longer a ~ pointer ↵toddaaro-4/+4
inside the task struct, and also added an assert to verify that send is never called inside scheduler context as it is undefined (BROKEN) if that happens
2013-08-01A major refactoring that changes the way the runtime uses TLS. In thetoddaaro-38/+38
old design the TLS held the scheduler struct, and the scheduler struct held the active task. This posed all sorts of weird problems due to how we wanted to use the contents of TLS. The cleaner approach is to leave the active task in TLS and have the task hold the scheduler. To make this work out the scheduler has to run inside a regular task, and then once that is the case the context switching code is massively simplified, as instead of three possible paths there is only one. The logical flow is also easier to follow, as the scheduler struct acts somewhat like a "token" indicating what is active. These changes also necessitated changing a large number of runtime tests, and rewriting most of the runtime testing helpers. Polish level is "low", as I will very soon start on more scheduler changes that will require wiping the polish off. That being said there should be sufficient comments around anything complex to make this entirely respectable as a standalone commit.
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-4/+4
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01make `in` and `foreach` get treated as keywordsDaniel Micay-14/+14
2013-07-26libstd: Tests for {peer, socket}_name.Luqman Aden-0/+86
2013-07-25libstd: Add ToStr impl for IpAddr.Luqman Aden-0/+42
2013-07-25libstd: Get rid of duplication in {peer, socket}_name and remove extra *.Luqman Aden-3/+3
2013-07-25libstd: Implement {peer, socket}_name for new rt tcp & udp.Luqman Aden-3/+48
2013-07-22std: make check appeasementJeff Olson-6/+7
2013-07-22std: minor timer cleanup based on feedbackJeff Olson-5/+5
2013-07-22std: add rt::io::TimerJeff Olson-0/+67
2013-07-19Changed methods on UDP sockets and TCP/UDP watchers to &mut self to reflect ↵Eric Reed-8/+9
that libuv may change the underlying handle.
2013-07-08Merge remote-tracking branch 'upstream/io' into ioEric Reed-5/+8
Conflicts: src/libstd/rt/uvio.rs
2013-07-02IPv6 support for UDP and TCP.Eric Reed-9/+271
2013-06-28librustc: Disallow "mut" from distributing over bindings.Patrick Walton-2/+5
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-28Convert vec::{reserve, reserve_at_least, capacity} to methods.Huon Wilson-1/+1
2013-06-27Convert vec::[mut_]slice to methods, remove vec::const_slice.Huon Wilson-2/+2
2013-06-26converted TCP interface to newtype structsEric Reed-24/+9
2013-06-26removed unecessary methodEric Reed-3/+1
2013-06-25Converted UdpSocket into a newtype struct and (dis)connecting uses move ↵Eric Reed-27/+12
semantics rather than ~.
2013-06-25IPv6 structEric Reed-2/+4
2013-06-25satisfy the formatting checkEric Reed-2/+2
2013-06-25Merge remote-tracking branch 'upstream/io' into ioEric Reed-1/+2
Conflicts: src/rt/rustrt.def.in
2013-06-25UDP networking with testsEric Reed-4/+99
2013-06-19derived instances of Eq and TotalEq for IpAddr rather than implement them ↵Eric Reed-21/+1
manually.
2013-06-19socket based UDP ioEric Reed-24/+77
2013-06-19Wrote the Eq instance of IpAddr in a slightly different way.Eric Reed-3/+3
2013-06-18std::rt: Work around a dynamic borrowck bugBrian Anderson-3/+2
2013-06-17Merge remote-tracking branch 'upstream/io' into ioEric Reed-15/+17
Conflicts: src/libstd/rt/uvio.rs
2013-06-17stated to implement UdpStreamEric Reed-4/+13
2013-06-17added Eq and TotalEq instances for IpAddrEric Reed-0/+21
2013-06-16Merge remote-tracking branch 'brson/io'Brian Anderson-3/+2
Conflicts: src/libstd/rt/comm.rs src/libstd/rt/mod.rs src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/rt/tube.rs src/libstd/rt/uv/uvio.rs src/libstd/rt/uvio.rs src/libstd/task/spawn.rs