Skip to content

Commit

Permalink
auto merge of #11186 : alexcrichton/rust/native-udp, r=brson
Browse files Browse the repository at this point in the history
I personally do not have huge amounts of experience in this area, so there's likely a thing or two wrong around the edges. I tried to just copy what libuv is doing as closely as possible with a few tweaks in a few places, but all of the `std::io::net::udp` tests are now run in both native and green settings so the published functionality is all being tested.
  • Loading branch information
bors committed Jan 1, 2014
2 parents 1dcc986 + bba78a2 commit 09a561a
Show file tree
Hide file tree
Showing 4 changed files with 379 additions and 113 deletions.
4 changes: 2 additions & 2 deletions src/libnative/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ impl rtio::IoFactory for IoFactory {
fn tcp_bind(&mut self, addr: SocketAddr) -> IoResult<~RtioTcpListener> {
net::TcpListener::bind(addr).map(|s| ~s as ~RtioTcpListener)
}
fn udp_bind(&mut self, _addr: SocketAddr) -> IoResult<~RtioUdpSocket> {
Err(unimpl())
fn udp_bind(&mut self, addr: SocketAddr) -> IoResult<~RtioUdpSocket> {
net::UdpSocket::bind(addr).map(|u| ~u as ~RtioUdpSocket)
}
fn unix_bind(&mut self, _path: &CString) -> IoResult<~RtioUnixListener> {
Err(unimpl())
Expand Down
Loading

0 comments on commit 09a561a

Please sign in to comment.