-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The major breaking change in Mio v0.8 is TcpSocket type being removed. Replacing Mio's TcpSocket we switch to the socket2 library which provides a similar type Socket, as well as SockRef, which provide all options TcpSocket provided (and more!). Tokio's TcpSocket type is now backed by Socket2 instead of Mio's TcpSocket. The main pitfall here is that socket2 isn't non-blocking by default, which Mio obviously is. As a result we have to do potentially blocking calls more carefully, specifically we need to handle would-block-like errors when connecting the TcpSocket ourselves. One benefit for this change is that adding more socket options to TcpSocket is now merely a single function call away (in most cases anyway).
- Loading branch information
1 parent
ac0f894
commit 8fb15da
Showing
3 changed files
with
109 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters