Skip to content

Commit bba78a2

Browse files
committed
Implement native UDP I/O
1 parent 2922697 commit bba78a2

File tree

4 files changed

+379
-113
lines changed

4 files changed

+379
-113
lines changed

src/libnative/io/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ impl rtio::IoFactory for IoFactory {
166166
fn tcp_bind(&mut self, addr: SocketAddr) -> IoResult<~RtioTcpListener> {
167167
net::TcpListener::bind(addr).map(|s| ~s as ~RtioTcpListener)
168168
}
169-
fn udp_bind(&mut self, _addr: SocketAddr) -> IoResult<~RtioUdpSocket> {
170-
Err(unimpl())
169+
fn udp_bind(&mut self, addr: SocketAddr) -> IoResult<~RtioUdpSocket> {
170+
net::UdpSocket::bind(addr).map(|u| ~u as ~RtioUdpSocket)
171171
}
172172
fn unix_bind(&mut self, _path: &CString) -> IoResult<~RtioUnixListener> {
173173
Err(unimpl())

0 commit comments

Comments
 (0)