summary refs log tree commit diff
path: root/src/libstd/net_tcp.rs
AgeCommit message (Collapse)AuthorLines
2012-07-04convert doc-attributes to doc-comments using ↵Gareth Daniel Smith-296/+284
./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-07-04Remove empty argument lists from do expressionsBen Striegel-6/+6
2012-07-03Change crust -> extern.Graydon Hoare-9/+9
2012-07-03Switch 'native' to 'extern' (or 'foreign' in some descriptions)Graydon Hoare-1/+1
2012-07-03core: Eliminate some overloading of the name "future" in future.rsPatrick Walton-3/+3
2012-07-02std: Ignore a test that doesn't terminate on windowsBrian Anderson-0/+1
2012-07-02Merge remote-tracking branch 'brson/uv'Brian Anderson-534/+605
Conflicts: src/libstd/net_ip.rs src/libstd/net_tcp.rs
2012-07-01Convert to new closure syntaxBrian Anderson-29/+27
2012-06-30Eliminate usages of old sugared call syntaxBrian Anderson-24/+24
2012-06-29Switch the compiler over to using ~[] notation instead of []/~. Closes #2759.Michael Sullivan-22/+22
2012-06-29std: cleanups, post-rebaseJeff Olson-0/+1
2012-06-29std/rt: cleanup and adding sockaddr_in6 mapping for win32Jeff Olson-1/+2
2012-06-29std: fix errors from recent rebase and vec expr/type syntax updateJeff Olson-23/+21
2012-06-29std: addressing #2656 (ipv6 support in net::tcp)Jeff Olson-25/+43
.. there are some additional FIXME nags in net_tcp (L 1012) about blocking because libuv is holding unsafe ptrs to task local data. the proposed fix going is not really feasible w/ the current design, IMO, but i'll leave it there in case someone really wants to make the case without creating more hassle than it's worth.
2012-06-29std: whitespace/comment cleanJeff Olson-8/+3
2012-06-29std: net::ip::get_addr is working w/ happy path test. needs more.Jeff Olson-9/+7
2012-06-29WIP set aside unshiftJeff Olson-1/+3
2012-06-29std: getting uv_ip6_* utils working in uv::llJeff Olson-3/+1
.. stub out some brokeness in net::tcp as a result of ipv6 coming online
2012-06-29std: adding uv::ll::ip4_name and refactored net::ip to use itJeff Olson-6/+14
replaces net::ip's previously, hand-rolled impl for ipv4 addr parsing.. we're relying on libuv, now
2012-06-29core: str::as_slice is unneeded, yay! fixes std::net::tcp socket_buf testJeff Olson-7/+5
i mistook an "unconstrained type" error, due to type-inference messup because i didnt have return vals in some closure wired-up right, for being due to not having a str as a str/& (a str will actually auto-coerce to a str/&, so str::as_slice was erroneously added. my bad).
2012-06-29std: test impl for using tcp_socket_buf and its reader/writer impls. fails.Jeff Olson-5/+91
needs work. probably the slice code and/or the way that the tcp_socket_buf is wrapped in a shared box
2012-06-29std: renaming impl for tcp_socket and reshuffle/cleanup for tcp_socket_bufJeff Olson-5/+3
2012-06-29std: finish impl of io::writer for tcp_socket_bufJeff Olson-4/+7
2012-06-29std: rework signature of tcp::write common impl to make io::writer possibleJeff Olson-1/+1
2012-06-29std: add buffered wrapper to tcp_socket + io::reader impl. no tests, yet.Jeff Olson-0/+106
need to do some other work, in the subsequent commit, to add io::writer, then tests.
2012-06-29std: doc and misc cleanup in net::tcpJeff Olson-21/+35
* updated rustdoc info for several functions * changed read_stop to take control of the port returned by read_start * made write_future do an explicit data copy with the binary vector it is passed
2012-06-29std: EADDRINUSE and EACCES err tests for tcp server + more cleanupJeff Olson-322/+278
.. confounded resolve!
2012-06-29std: factor main body of tcp::listen into reusable listen_commonJeff Olson-5/+19
2012-06-29std: some cleanup in net::tcp rename listen_to_conn->listenJeff Olson-29/+30
2012-06-29std: dump the tcp::new_listener server APIJeff Olson-202/+7
2012-06-29std: mod cleanup, impl/test for conn. refused err + mem leak fixJeff Olson-35/+100
2012-06-29std: import/export cleanup in net_tcpJeff Olson-41/+45
2012-06-26libstd: Work around some metadata infelicities that are causing problems in ↵Patrick Walton-6/+7
resolve3, and remove an unused glob Conflicts: src/libstd/net_tcp.rs src/libstd/par.rs
2012-06-25Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725.Michael Sullivan-24/+24
2012-06-25MergeTim Chevalier-8/+8
2012-06-22core: Name is_failure to is_err, is_success to is_okBrian Anderson-8/+8
2012-06-22Change resources to classes in libstd and rustcTim Chevalier-32/+41
2012-06-21Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.Graydon Hoare-21/+14
2012-06-04Machine types are different from int/uint, etc (Issue #2187)Eric Holk-4/+5
2012-05-25Get rid of many implicit copies as a preliminary to Issue #2448.Michael Sullivan-4/+4
2012-05-25std: Rename uv::hl to uv::iotask. Additional cleanupBrian Anderson-37/+39
2012-05-24std: FIXME's and cleanups for uvBrian Anderson-3/+11
2012-05-24remove dead assignmentsNiko Matsakis-2/+1
2012-05-22std: high-level libuv-leverage APIs now take a hl_loop as arg (tcp/timer)Jeff Olson-19/+33
2012-05-22std: more work on uv tests to endure valgrind's machinations against themJeff Olson-3/+3
- change port of tcp server test in uv_ll to avoid conflict w/ test in net::tcp - a few places the tcp::read fn is used in test w/ a timeout.. suspend use of the timeout from here on out.
2012-05-22std:: adding tcp::read fn as simple, blocking read operation, akin to writeJeff Olson-90/+219
also: read_future ala write_future .. woooooohooooooooo
2012-05-22std: adding tcp::write_future for non-block tcp writes, docs cleanupJeff Olson-44/+52
2012-05-22std: several minor cleanups wrt codereview.. see extended commentsJeff Olson-31/+26
* there are a few places where I was experimenting w/ using `alt` in places where `if`/`else` would've sufficed. don't drink the koolaid! * I had an unneeded `else` structure (the `if` branch that preceeded concluded with a `fail` statement.. I added the `fail` later in the dev cycle for this branch, so I forgot to remove the `else` after doing so) * consistent wrt `prop_name: value` vs. `prop_name : value` in record decl and initialization * change an `alt` exp on an `ip_addr` to actually be exhaustive, instead of using a catch-all clause
2012-05-22std: more docs and some methods for types in net::tcpJeff Olson-4/+66
2012-05-22std: splitting out tcp server API + testsJeff Olson-100/+226
- we now have two interfaces for the TCP/IP server/listener workflow, based on different user approaches surrounding how to deal with the flow of accept a new tcp connection: 1. the "original" API closely mimics the low-level libuv API, in that we have an on_connect_cb that the user provides *that is ran on the libuv thread*. In this callback, the user can accept() a connection, turning it into a tcp_socket.. of course, before accepting, they have the option of passing it to a new task, provided they *make the cb block until the accept is done* .. this is because, in libuv, you have to do the uv_accept call in the span of that on_connect_cb callback that gets fired when a new connection comes in. thems the breaks.. I wanted to just get rid of this API, because the general proposition of users always running code on the libuv thread sounds like an invitation for many future headaches. the API restriction to have to choose to immediately accept a connection (and allow the user to block libuv as needed) isn't too bad for power users who could conceive of circumstances where they would drop an incoming TCP connection and know what they're doing, in general. but as a general API, I thought this was a bit cumbersome, so I ended up devising.. 2. an API that is initiated with a call to `net::tcp::new_listener()` .. has a similar signature to `net::tcp::listen()`, except that is just returns an object that sort of behaves like a `comm::port`. Users can block on the `tcp_conn_port` to receive new connections, either in the current task or in a new task, depending on which API route they take (`net::tcp::conn_recv` or `net::tcp::conn_recv_spawn` respectively).. there is also a `net::tcp::conn_peek` function that will do a peek on the underlying port to see if there are pending connections. The main difference, with this API, is that the low-level libuv glue is going to *accept every connection attempt*, along with the overhead that that brings. But, this is a much more hassle-free API for 95% of use cases and will probably be the one that most users will want to reach for.