diff options
| author | Eric Reed <ereed@mozilla.com> | 2013-07-17 15:16:44 -0700 |
|---|---|---|
| committer | Eric Reed <ereed@mozilla.com> | 2013-07-19 13:04:03 -0700 |
| commit | 968f7f5d3d64b481fb68651d9274768fe5e98853 (patch) | |
| tree | 8c0ea1cca0c2ba8983eee8e4015d1aeff0f48387 /src/libstd/rt/rtio.rs | |
| parent | 0d04aa78e5e8a7e3c48141028137c1a69e7e32ee (diff) | |
| download | rust-968f7f5d3d64b481fb68651d9274768fe5e98853.tar.gz rust-968f7f5d3d64b481fb68651d9274768fe5e98853.zip | |
Changed methods on UDP sockets and TCP/UDP watchers to &mut self to reflect that libuv may change the underlying handle.
Diffstat (limited to 'src/libstd/rt/rtio.rs')
| -rw-r--r-- | src/libstd/rt/rtio.rs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/libstd/rt/rtio.rs b/src/libstd/rt/rtio.rs index 6bf352ee144..10eba85188e 100644 --- a/src/libstd/rt/rtio.rs +++ b/src/libstd/rt/rtio.rs @@ -50,37 +50,37 @@ pub trait IoFactory { pub trait RtioTcpListener : RtioSocket { fn accept(&mut self) -> Result<~RtioTcpStreamObject, IoError>; - fn accept_simultaneously(&self); - fn dont_accept_simultaneously(&self); + fn accept_simultaneously(&mut self); + fn dont_accept_simultaneously(&mut self); } pub trait RtioTcpStream : RtioSocket { - fn read(&self, buf: &mut [u8]) -> Result<uint, IoError>; - fn write(&self, buf: &[u8]) -> Result<(), IoError>; - fn peer_name(&self) -> IpAddr; - fn control_congestion(&self); - fn nodelay(&self); - fn keepalive(&self, delay_in_seconds: uint); - fn letdie(&self); + fn read(&mut self, buf: &mut [u8]) -> Result<uint, IoError>; + fn write(&mut self, buf: &[u8]) -> Result<(), IoError>; + fn peer_name(&mut self) -> IpAddr; + fn control_congestion(&mut self); + fn nodelay(&mut self); + fn keepalive(&mut self, delay_in_seconds: uint); + fn letdie(&mut self); } pub trait RtioSocket { - fn socket_name(&self) -> IpAddr; + fn socket_name(&mut self) -> IpAddr; } pub trait RtioUdpSocket : RtioSocket { - fn recvfrom(&self, buf: &mut [u8]) -> Result<(uint, IpAddr), IoError>; - fn sendto(&self, buf: &[u8], dst: IpAddr) -> Result<(), IoError>; + fn recvfrom(&mut self, buf: &mut [u8]) -> Result<(uint, IpAddr), IoError>; + fn sendto(&mut self, buf: &[u8], dst: IpAddr) -> Result<(), IoError>; - fn join_multicast(&self, multi: IpAddr); - fn leave_multicast(&self, multi: IpAddr); + fn join_multicast(&mut self, multi: IpAddr); + fn leave_multicast(&mut self, multi: IpAddr); - fn loop_multicast_locally(&self); - fn dont_loop_multicast_locally(&self); + fn loop_multicast_locally(&mut self); + fn dont_loop_multicast_locally(&mut self); - fn multicast_time_to_live(&self, ttl: int); - fn time_to_live(&self, ttl: int); + fn multicast_time_to_live(&mut self, ttl: int); + fn time_to_live(&mut self, ttl: int); - fn hear_broadcasts(&self); - fn ignore_broadcasts(&self); + fn hear_broadcasts(&mut self); + fn ignore_broadcasts(&mut self); } |
