- Added
peer_fn
method to UtpSocket.
- Fixed arithmetic operation overflow when calculating the delay between peers.
- Unconnected sockets and streams no longer send fast resend requests before failing.
- Fixed Windows build.
- Packets are resent if no acknowledgment is received before timeout.
- Sockets time out after too many retransmissions (configurable), returning an error.
- Socket creation no longer fails with arithmetic overflow when generating a random connection identifier.
- SACK extension generation no longer fails with arithmetic overflow.
- Resending lost packets no longer floods the connection.
- Fixed packet extension encoding.
- Many protocol bug fixes.
- Fixed warning about Sized in trait on rustc 1.4.0-nightly (10d69db0a 2015-08-23) (RFC 1214 fallout)
- Implemented the
Deref
trait for easy conversion fromUtpStream
instances into the underlyingUtpSocket
.
UtpSocket::connect
is now a function instead of a method on aUtpSocket
instance (i.e., it doesn't require a socket to be called).
- Added
local_addr
for bothUtpSocket
andUtpStream
.
- Added
local_addr
for bothUtpSocket
andUtpStream
. - Added the
Into
trait for easy conversion fromUtpSocket
instances intoUtpStream
.
UtpListener::accept
now returns both the new socket and the remote peer's address (Result<UtpSocket, SocketAddr>
), similarly toTcpListener
.UtpListener::incoming
now also returns the remote peer's address, similarly toaccept
but unlikeTcpListener::incoming
.
- Added
UtpListener
(similar to [TcpListener
][http://doc.rust-lang.org/std/net/struct.TcpListener.html]).
- Removed assertions about
off_target
, which were killing innocent connections.
- Fixed bug when adjusting congestion window caused by miscalculating the delay between peers.
- Fixed bug where missing packets weren't being re-sent after sending a FIN.
- Fixed bug where a stream wouldn't bind to an address of the appropriate family when the remote peer had an IPv6 address.
- Fixed bug where the congestion window would only shrink when packet loss was detected and not on delay changes.
- A call to
UtpStream::write
orUtpSocket::send_to
no longer blocks until every packet is acknowledged. To force the old, slower behaviour, callflush
after the usual calls (usually you won't need to do this, as the socket/stream is flushed on close/drop).
- Fixed bug where extensions could be skipped when parsing a packet.
- Improved reliability of packet parsing.
- Fixed compilation errors in 1.0.0-beta.2
- Improved resilience to errors --- receiving an invalid packet no longer leads to a panic
- Sockets with established connections refuse new connections
No functional changes.
- Removed stability attributes.
- Removed an unnecessary partial clone when handling a received packet.
- Dropping an
UtpSocket
(or a wrapping struct likeUtpStream
) properly closes open connections.
Improved performance encoding and decoding packets.
- Now the crate builds in both the latest nightly and 1.0.0-beta.
No functional changes, mostly just changes to conform to changes in the Rust API.
- Updated the
rand
dependency because the previous one didn't build on the latest Rust nightly.
- Some
UtpStream
tests were failing because of improperly sized buffers.
This release is now compatible with the 2015-03-28 nightly of the Rust compiler.
Some things changed during the migration to the new std::net
API and performance is now much lower. It might take me a while to come up with performance improvements and a replacement for the lost set_timeout
method in UdpSocket
.
- Updated example in README.
UtpStream
andUtpSocket
now accept variables implementing theToSocketAddrs
trait, likeUdpSocket
in the standard library.- Reading from a socket now returns
Result<(usize, SocketAddr)>
. - Reading from a stream now returns
Result<usize>
. - Reading from a closed socket/stream now returns
Ok((0, remote_peer))
/Ok(0)
instead ofErr(Closed)
.
UtpStream
now implements theRead
andWrite
traits.
- The
Reader
andWriter
traits were removed, in accordance to the recent IO reform in Rust. - Support for connection timeouts were removed, which may impact packet loss handling in some cases.