nervosnetwork / tentacle

A multiplexed p2p network framework that supports custom protocols
https://docs.rs/tentacle
MIT License
54 stars 24 forks source link

yamux: can not work properly when server listening on a serial port inside VM, and client connet the serial port socket outside VM #314

Open abel-von opened 3 years ago

abel-von commented 3 years ago

package sent by server can not reach client.

driftluo commented 3 years ago

I'm not sure what serial port you are talking about, but yamux itself is just a subcontracting library. The real communication depends on the underlying io implementation. If the underlying io abstraction does not correctly implement the two traits of AsyncRead and AsyncWrite, it will not be possible to work.

You can see that when I was testing, I mocked a memory io, If there is a problem, such a test will also be problematic.

I suggest whether to provide a mock scene reproduction to facilitate the location of the problem

driftluo commented 2 years ago

maybe fix by #340