Releases: maidsafe/qp2p
v0.17.1
v0.17.0
v0.16.0
0.16.0 (2021-08-27)
⚠ BREAKING CHANGES
-
The
Endpoint::bootstrap_nodes
method has been removed since it is no longer set. -
The
Error
type has been removed. -
Endpoint::try_send_message
now returnsResult<(), Option<SendError>>
rather thanResult<(), Error>
. TheError::MissingConnection
variant has been removed. -
Endpoint::is_reachable
now returnsResult<(), RpcError>
, rather thanResult<(), Error>
. -
The
Result
alias has been removed. It can be replaced bystd::result::Result<T, qp2p::Error>
. -
The
QuicP2p
type has been removed. UseEndpoint::new
orEndpoint::new_client
instead. TheBootstrapFailure
,EmptyBootstrapNodesList
,Io
,Endpoint
,NoEchoServerEndpointDefined
,EchoServiceFailure
,CannotAssignPort
,IncorrectPublicAddress
, andUnresolvedPublicIp
Error
variants have been removed. -
The
IgdAddPort
,IgdRenewPort
,IgdSearch
, andIgdNotSupported
variants have been removed fromError
. These variants would never have been returned, but may be referenced in matches againstError
values. -
The
RecvNextError
andUnexpectedMessageType
types have been removed.RecvError
is used whereRecvNextError
was used previously. -
The
SendError::TooLong
variant has been removed. The same condition (attempting to send a message longer thanu32::MAX
bytes) will now returnSendError::Serialization
. -
RecvStream::next
now returnsRecvNextError
as the error type. The followingError
variants have been removed:Error::Serialisation
(this is now fully covered bySendError
andRecvError
).Error::InvalidMsgFlag
(this case is now covered byRecvError::Serialization
).Error::StreamRead
(this is now covered byRecvError
).Error::EmptyResponse
(this case is now covered byRecvError::Serialization
).Error::UnexpectedMessageType
(this case is now covered by `ReadNextError::UnexpectedMessageType).
Finally, a
Recv
variant has been added toError
. -
The following APIs had their error type changed from
Error
toSendError
:SendStream::send_user_msg
SendStream::send
SendStream::finish
Endpoint::send_message
Additionally, the
StreamWrite
andMaxLengthExceeded
variants have been removed fromError
, and aSend
variant has been added. -
SendStream::send
is no longer public.Error::UnexpectedMessageType
now contains a simple error struct. -
Endpoint::connect_to
andEndpoint::open_bidirectional_stream
now useConnectionError
, rather thanError
, for error results. -
Endpoint::disconnect_from
now returns()
. -
The
Error::UnknownStream
variant has been removed. -
SendStream::set_priority
is now infallible and returns()
. -
SendStream::priority
has been removed. -
The
Error::Connect
andError::ConnectionClosed
variants have been removed. Several additional variants have been added toConnectionError
. -
Endpoint::connect_to_any
now returnsOption<SocketAddr>
instead ofResult<SocketAddr>
. -
The
ConnId::generate
method now returnsSelf
, and doesn't allow for errors. TheError::ConnectionIdGeneration
variant has been removed. -
Endpoint::socket_addr
has been renamed topublic_addr
. -
The
Error::UnexpectedError
variant has been removed. -
The
Error::DisconnectionNotification
andError::Configuration
variants have been removed. -
There are several breaking changes:
QuicP2p::from_config
now returnsResult<Self, ConfigError>
.- The
Error::CertificateParse
variant has been removed. - The
Error::CertificatePkParse
variant has been removed. - The
Error::CertificateGen
variant has been removed. - The
Error::Tls
variant has been removed.
-
The
Error::Base64Decode
variant has been removed. -
The duration fields in config have all changed:
idle_timeout_msec
is renamedidle_timeout
and is now anOption<Duration>
.keep_alive_interval_msec
is renamedkeep_alive_interval
and is now anOption<Duration>
.upnp_lease_duration
is now anOption<Duration>
.retry_duration_msec
is renamedmin_retry_duration
and is now anOption<Duration>
.
-
QuicP2p::from_config
now takes aConfig
argument, rather thanOption<Config>
.Config::default()
(orOption::unwrap_or_default
) should be used instead. -
Config::hard_coded_contacts
andConfig::bootstrap_cache_dir
have been removed. Additionally,QuicP2p::with_config
no longer takesbootstrap_nodes
– these should instead be passed toQuicP2p::bootstrap
. Finally, theError::InvalidPath
andError::UserHomeDir
variants have been removed. -
Config::local_ip
andConfig::local_port
have been removed.QuicP2p::bootstrap
andQuicP2p::new_endpoint
now require a local address to bind to. TheError::UnspecifiedLocalIp
variant has been removed. -
This is a breaking behavioural change. It is now up to the caller if they want to retry with a different port.
-
Config::max_msg_size_allowed
has been removed.
Features
- Add
Endpoint::connect_to_any
(59d0b5e) - Add
Endpoint::new_client
constructor (176d025) - Add
RecvNextError
for receive-specific errors (7e6e4a9) - Add
SendError
for send-specific errors (73c6501) - Add public
Endpoint::new
constructor (c448df2)
Bug Fixes
-
Add missing re-export for
TransportErrorCode
(8cf4f88) -
Don't use connection pool in
Endpoint::is_reachable
(8a7260b) -
Fix
WireMsg
visibility (33e9b3b) -
Make connection deduplicator handle cancellations (a0404ac)
-
Delete
SerializableCertificate
(4bbcd29) -
Make
Config
inQuicP2p::from_config
non-optional (19b3795) -
Make
ConnId::generate
infallible (ea089ac) -
Make
Endpoint::disconnect_from
infallible (9eb947f) -
Merge 'connect' and 'close' errors with
ConnectionError
(9aae2e3) -
Move local address from config to
QuicP2p::bootstrap
(de9763d) -
Refactor
WireMsg::read_from_stream
to avoid logic error (047d071) -
Remove
BootstrapCache
and hard-coded contacts (df3fef8) -
Remove
Endpoint::bootstrap_nodes
(c399bca) -
Remove
Error::UnknownStream
variant (2386486) -
Remove
Error
(5608f27) -
Remove
QuicP2p
(44d964c) -
Remove
Result
alias (e528134) -
Remove random port fallback (9b1612a)
-
Remove unused
Config::max_msg_size_allowed
(44d750f) -
Remove unused
Error
variants (3b8174a) -
Rename
Endpoint::socket_addr
topublic_addr
(91d8457) -
Return
Option
fromEndpoint::connect_to_any
(5d374fa) -
Return
RpcError
fromEndpoint::is_reachable
(674ad2d) -
Return
SendError
inEndpoint::try_send_message
(c43855b) -
Separate
ConfigError
fromError
(e837aca) -
Treat unexpected messages as serialization errors (e0695c3)
-
Use
ConnectionError
when possible (db74509) -
Use
Duration
in config and centralise defaults (86f886b) -
Use
SerializationError
for too long messages (5bf79c1)
v0.15.3
v0.15.2
v0.15.1
v0.15.0
0.15.0 (2021-08-11)
⚠ BREAKING CHANGES
-
The
Error::QuinnConnectionClosed
variant has been
renamedError::ConnectionClosed
and now contains closure information.
TheError::Connection
variant has been renamed
Error::ConnectionError
, and now contains aConnectionError
.
quinn::ConnectionError
is no longer re-exported. -
Separate connection close from errors (4d3d4eb)