about summary refs log tree commit diff
path: root/src/libnative/io
diff options
context:
space:
mode:
authorOGINO Masanori <masanori.ogino@gmail.com>2014-06-30 12:08:27 +0900
committerOGINO Masanori <masanori.ogino@gmail.com>2014-07-02 08:21:42 +0900
commitdfdce47988b7d98c617254904f8c62d1f4d83824 (patch)
tree6dc1271b8f279594eebd2513c76d36e037341f1c /src/libnative/io
parent44ec28cfac9fa3f738e0e77ccca1d804125fd1dd (diff)
Rename recvfrom -> recv_from, sendto -> send_to.
POSIX has recvfrom(2) and sendto(2), but their name seem not to be
suitable with Rust. We already renamed getpeername(2) and
getsockname(2), so I think it makes sense.

Alternatively, `receive_from` would be fine. However, we have `.recv()`
so I chose `recv_from`.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Diffstat (limited to 'src/libnative/io')
-rw-r--r--src/libnative/io/net.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs
index 395c063e706..dfc2c55cde7 100644
--- a/src/libnative/io/net.rs
+++ b/src/libnative/io/net.rs
@@ -630,7 +630,7 @@ impl rtio::RtioSocket for UdpSocket {
 #[cfg(unix)]    type msglen_t = libc::size_t;
 
 impl rtio::RtioUdpSocket for UdpSocket {
-    fn recvfrom(&mut self, buf: &mut [u8]) -> IoResult<(uint, rtio::SocketAddr)> {
+    fn recv_from(&mut self, buf: &mut [u8]) -> IoResult<(uint, rtio::SocketAddr)> {
         let fd = self.fd();
         let mut storage: libc::sockaddr_storage = unsafe { mem::zeroed() };
         let storagep = &mut storage as *mut _ as *mut libc::sockaddr;
@@ -652,7 +652,7 @@ impl rtio::RtioUdpSocket for UdpSocket {
         })
     }
 
-    fn sendto(&mut self, buf: &[u8], dst: rtio::SocketAddr) -> IoResult<()> {
+    fn send_to(&mut self, buf: &[u8], dst: rtio::SocketAddr) -> IoResult<()> {
         let (dst, dstlen) = addr_to_sockaddr(dst);
         let dstp = &dst as *const _ as *const libc::sockaddr;
         let dstlen = dstlen as libc::socklen_t;