-
Why can't AsyncRead and AsyncWrite traits be supported like TcpStream |
Beta Was this translation helpful? Give feedback.
Answered by
b23r0
Jun 12, 2022
Replies: 1 comment
-
Since Raknet is a message protocol, not a stream protocol like Tcp, it should implement features like UdpSocket. According to the interface required by Async Read/Write, each IO needs to pass a fixed-size buffer to receive data, which may cause Raknet to fail to receive a complete or independent message each time IO. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
R4cky
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since Raknet is a message protocol, not a stream protocol like Tcp, it should implement features like UdpSocket.
According to the interface required by Async Read/Write, each IO needs to pass a fixed-size buffer to receive data, which may cause Raknet to fail to receive a complete or independent message each time IO.