- Fix compilation issue in Linux
- Add
bin_device()
option for TCP: #158
- Use builders for build transport options: #153
- New transport options for TCP adapter: source_address and bind_device: #154
- Fixed compilation issue when only
tcp
feature is enabled
- Configurable network adapters: #141
- TCP keepalive configurable option: #143
- UDP with configurable source address, reuse address, reuse port: #145, #146
- UDP linux mimic behaviour for receive broadcasts #149
- Updated dependencies.
- Fix timer concurrent issue: #136
- Updated mio to 0.8
- Updated cargo clippy
- Updated dependencies.
- Fixed clippy issues in nightly.
- Removed a
peer_addr()
call used in a log with potential issues in some cases.
- Added
EventSender::cancel_timer()
to allow cancel timers already sent. - Added a
TimerId
as a result of callingEventSender::send_with_timer()
.
websocket
feature compiling without tls.
- Fixed isolated compilation with
websocket
feature. - Fixed multicast issue in Mac.
NodeTask
is now considered must_use.
- Asynchronous connections:
NetworkController::connect()
behaviour modified. Now it performs a non-blocking connection. Previous behaviour withconnect_sync
version. - Reduced slightly the websocket latency.
- Adapter API modified to handle easily handshakes.
- Fixed websocket issue that could offer an accepted connection that was yet not valid.
- Added
NetworkController::is_ready()
- Added
borrow()
method forStoredNetEvent
to transform in intoNetEvent
. - Added
is_local()
andis_remote()
helpers toResourceId
. - Added
SendStatus::ResourceNotAvailable
- Modified
SendStatus::MaxPacketSizeExceeded
, now it not contains lengths info. - Renamed
udp::MAX_COMPATIBLE_PAYLOAD_LEN
toudp::MAX_LOCAL_PAYLOAD_LEN
, value updated withudp::MAX_PAYLOAD_LEN
. - Removed
udp::MAX_PAYLOAD_LEN
. - Added
udp::MAX_NETWORK_PAYLOAD_LEN
.
Version 0.14 modifies the connect()
behaviour to perform a
non-blocking connections instead.
It is recommended to use this non-blocking mode in order to get the
best scalability and performance in your application. If you need to perform
a similar blocking connection as before (version 0.13), you can call to connect_sync()
.
Note also that the previous NetEvent::Connect
has been renamed to NetEvent::Accepted
.
The current NetEvent::Connect
behaves as a new event to deal with the new non-blocking connections.
See NetEvent
docs for more info.
- Fixed a bad internal assert.
- Added
Endpoint::from_listener()
that allows to send datagrams from listeners in non connection-oriented protocols (see the API docs). - Removed
'static
restriction in theNodeListener::for_each()
callback. Now, you can pass references to the callback. - Faster compilation. Reduced some dependencies.
- Faster
NodeHandler
clone and less memory usage in each instance.
- Added
NodeListener::enqueue()
.
- Updated
NodeListener::for_each
to works fully synchronous.Send
trait of the event callback parameter has been removed to works fine with objects likeRc
Cell
or references. This function no longer returns aNodeTask
. - New method
NodeListener::for_each_async
has been added to support the previous behaviour offor_each
. - Added
Debug
toNodeEvent
.
- Reduced WebSocket latency.
- WebSocket now can returns when send correctly a
SendStatus::MaxPacketSizeExceeded
instead ofResourceNotFound
if the packet size is exceeded. - UDP has increases the packet size when send. Now more bytes per packet can be sent if the OS let it.
- Exported some adapter constants dependent.
Transport::max_message_size()
now represents the teorical maximum size (see its related docs).
- Node concept:
NodeHandler
andNodeListener
. - Non-mutable and shared network operations.
- Removed AdapterEvent. Now, the only network event is NetEvent that has been modified to contains a reference to the data instead of an allocated vector.
- Removed
Network
entity that has been substituted byNetworkController
to handle connect/listen/remove/send andNetworkProcessor
to handle the input events. - Remamed
EventQueue
toEventReceiver
. - Minor API additions.
- Now UDP never generates disconnection events.
- Increased performance:
- Latency reduced in arround 66%.
- Zero-copy message.
Version 0.12 comes with important API changes (changelog) in order to reach zero-copy write/read goal.
For a soft transition, you can use NodeListener::enqueue()
(see docs).
- Reduce the bandwidth of
FramedTcp
transport using variadic encoding instead of constant padding.
- Implemented
Serialize
/Deserialize
forTransport
. - Implemented
Serialize
/Deserialize
forRemoteAddr
. - Changed
Url
toString
inRemoteAddr
. - Changed
RemoteAddr
variant fromSocketAddr
toSocket
. - Changed
RemoteAddr
variant fromUrl
toStr
. - Increase the
ToRemoteAddr
support for many types. - Returned value of
Netowork::remove()
as boolean. Rationale: Removing a connected connection could returnNone
in the previous version ofremove
if just a disconnection happen. The user probably will use.unwrap()
on it adding a potential bug. Changing fromOption<()>
tobool
avoid this usage. - Added
RegisterId
of the listener which generates the connection inAdapterEvent::Added
andNetEvent::Connection
events.
- Added
try_receive()
toEventQueue
for non-blocking event read. - tests and benchmarks running with any number of features enabled.
- Transport by features:
tcp
,udp
,websocket
.
- Renamed
Transport::Tcp
asTransport::FramedTcp
. WARNING: If previously you was usingTransport::Tcp
you probably want to use nowTransport::FramedTcp
(that behaves the same). - Added
Transport::Tcp
that has no encoding layer. NowTransport::Tcp
is purely TCP. - Renamed
Transport::max_payload()
toTransport::max_message_size()
. - Added
Endpoint
intoAdapterEvent
. - Fixed
ResourceId
compilation in 32-bits. - Reverted inner tuple position of
Network::split()
in version 0.8. FirstNetwork
thenEventQueue
, as an user would expect.
If you comming from 0.9.4 o less, note that Transport::Tcp
has been renamed
to Transport::FramedTcp
to be more according to its behaviour.
See more here.
- Fixed issue with
ResourceId
.
- Removed
EventQueue
drop restriction of having already droped the associated senders.
- Added
Network::split_and_map_from_adapter()
.
- Fixed an UDP issue that could imply losing packet if they were sent consequently very fast.
- Fixed a TCP encoding issue.
- Fixed a Websocket issue that could imply to lost a message just after being accepted.
- Added burst integration test with order check.
- Removed serialization. Rationale:
The serialization inside
message-io
was merely a shortcut, than in most of the cases reduced the power of the user by save 2-3 lines of their code. The serialization should be handle by the user for several reasons:- The user could want to decide send the message in base of the serialized data size. (e.g. chosing a diffenrent transports if the serialized size exceeds the max packet size)
- The user could want to perform some action over raw data.
- The user could make a gateway without needed to deserialize to serialize again.
- Or simply, there is no need to serialize in some cases.
Network::remove_resource()
toNetwork::resource()
.- Exposed
AdapterEvent
. - Added
Network::split_and_map()
. - Added Transport::max_payload().
- Exposed
encoding
module. - Fixed message_size test for big messages.
- Ensured correct drop order in the
EventQueue
and its senders.
- Non-blocking Websocket acception. It will improves the speed when you are listen for a websocket connection.
- Fixed ping-pong example for
udp
andws
. - Protect Websocket listeners from erronous acceptions.
- Returned
local_addr
atconnect()
function. - Fixed ping-pong example.
- Added WebSocket support based in
tungstenite-rs
- Added
Network::split()
function. - Join
udp
andtcp
examples to make theping-pong
example with WebSocket support. - Improved
RemoteAddr
traits.
- Internal improvements in order to use one thread for all adapters.
- Clean architecture to implement new adapters easier (an internal API).
- Increase the UDP packet size that can be sent.
- Correcly managed ConectionRefused error generated by ICMP in UDP connections.
- Correcty notified when remove a multicast udp connection.
- Fixed some cases when udp multicast was not leaving.
- Fixed some memory leaks at decoding pool.
- Removed unused
Network::local_addr
. - Renamed from
SendingStatus
toSendStatus
. - Renamed from
SendingStatus::RemovedEndpoint
toSendingStatus::ResourceNotFound
. - Renamed from
MAX_UDP_LEN
toMAX_UDP_PAYLOAD_LEN
. - Renamed from
AddedEndpoint
toConnected
. - Renamed from
RemovedEndpoint
toDisconnected
. - Added
RemoteAddr
for replaceSocketAddr
in connections. - Renamed from
Listener
toLocal
in resource contexts. - Improvement speed in TCP framing.
- Added concurrent writing and reading from socket/streams in UDP and TCP protocols.
- Removed UDP enconding (improved speed)
- The Resource id from
Endpoint
is now a struct calledResourceId
instead ofusize
. - Modified connect/listen API functions.
Now it make uses of the
Transport
enum in order to specify the transport. - Removed
listen_udp_multicast()
from network. Now it make uses of listen() function. If it uses an ipv4 multicast address it is set as multicast. - Adding a
SendingStatus
to sending functions.
- Fixed a leak memory with timer events.
- Improved timer events accuracy.
- Fixed decoding issue when the messages length was less than encoding padding.
- Renamed:
receive_event_timeout
toreceive_timeout
. - Renaded:
NetworkManager
toNetwork
. - Fixed Reset-by-peer errors. Now it generates a RemoveEndpoint event.
- Added DeserializationError Event that is generated when there is a problem at deserializing.
- Removed Result from
send()
andsend_all()
functions. Now if some error happens during sending, a RemovedEndpoint will be generated (only in Tcp).
- Fixed lost decoding memory at disconnection.
- Fixed issue in send methods where sometimes data is lost.
- Fixed lost fragmented UDP. Before this change, a huge UDP message could be sent without respect the MTU size, now it panics.
- Fixed rare issue of EventQueue dropping when the sender send and event and the receiver is already removed.
- Fixed enconding issue related several messages in the same data chunk.
- Added
file-transfer
example. - Added minnor encoding test.
- Added support for message greater than 2^15.
- Added minnor encoding test.
- Fixed deconding issue with multiple messages at once.
- Fixed endpoint docs
- Fixed multicast blocking issue
- Fixed docs
- Added encoding module.
- Added a encode layer over TCP/UDP.
- Added Basic integration end-to-end tests.
- Added unitary tests for encoding exact messages.
- Added multicast support.
- Added multicast example.
- Modified
connect()
/listen()
functions api to make them simpler. Before:Now:network.connect("127.0.0.1:1234".parse().unwrap(), TransportProtocol::Tcp);
network.connect_tcp("127.0.0.1:1234");
- Modified
connect()
returned value, beforeOption<(Endpoint, SocketAddr)>
, nowOption<Endpoint>
The socket address can extracted using the network instance or keeping the input connection address. - Modified several
Option
returned values byResult
in order to get a better management of the errors. - Modified: the Endpoint is now an structure with two properties, connection id and address.
- Removed address field from AddedEndpoint network event since Endpoint contains it.
- Removed:
endpoint_remote_address
since Endpoint contains the address. - Removed
TransportProtocol
. - Free all resources in the distributed example.
- Fixed sending by endpoints created by
UdpListener
. - Fixed bug when sending by UDP in the basic example.
- Added a simple TCP example.
- Added a simple UDP example.
- Removed basic example (too many mixed concepts). All API is mostly coverad among all examples.
- Fixed some unremoved memory related to UDP.
- Performance improvements.
- Added events unitary tests.
- Internal behavior changed: non-blocking TCP stream.
- Fixed some UDP issues.
- Internal thread names for debugging easily.
- Modified distributed example to use UDP instead of TCP in the participant connections.
- Fixed issue with the
TcpListener
. Sometimes a socket was not registered into the connection registry if several endpoints connect to a same listener at the same time. - Added a distributed example based on a discovery server.
- Added traces to
network_adapter
module - Removed
Cargo.lock
to the tracking files.
- Added
send_with_priority()
method to theEventSender
in order to emulate a LIFO in some cases. - Added Debug trait to
NetEvent
. - Minor API changes.
- Fixed hello_world_server example.
- Fixed issue when a listener is interrupted by OS.
- Added log traces.
- Minor API changes.
- Clean code, rename modules.
- First release