about summary refs log tree commit diff
path: root/src/libstd/rt/io/net
AgeCommit message (Collapse)AuthorLines
2013-08-09Fix Ipv6Addr to_str for ::1:x.x.x.x addressesStepan Koltsov-1/+8
Reported by luqmana@
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-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-5/+5
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-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-02IPv6 support for UDP and TCP.Eric Reed-9/+271
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-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-17Merge remote-tracking branch 'upstream/io' into ioEric Reed-2/+2
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-04std::cell: Modernize constructorsPhilipp Brüschweiler-2/+2
Part of #3853
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+492
This only changes the directory names; it does not change the "real" metadata names.