Better TSize support, source IP/port check and more
New Features (fully backward-compatible):
- Uses
Seek
in case sender asked to send tsize option andio.Reader
provided toReadFrom
method satisfyio.Seeker
interface. In many cases (e.g. whenos.File
is used as an argument toReadFrom
) there is no need anymore to explicitlySetSize
usingOutgoingTransfer
interface. - Default backoff jitter can be can be overridden in clients and servers by providing a custom backoff calculation function. See
SetBackoff
method. Implemented by @acd RemoteAddr
method allows retrieving remote peer's IP address and port. It can be particularly useful for logging from inside request handlers. Implemented by @acd
Protocol implementation improvements by @acd:
- Remote port / TID check during transmission.
- Remote IP address check (necessary due to the use of unconnected UDP sockets).
Fixes:
- Close UDP connection at the end of a transfer. No connections piling up on OS X anymore, no need to bump
ulimit
to allow more open file descriptors. - Correct server IP in unit-tests allows reliable unit-tests execution on OS X. It was discovered during remote IP check testing and was fixed by @acd. No test flaps on OS X anymore.