tokio-modbus
tokio-modbus copied to clipboard
Make TCP accept AsyncRead + AsyncWrite
Hi!
Would you accept a PR with reworks Modbus TCP to allow to use AsyncRead + AsyncWrite?
As a TcpStream has too AsyncRead + AsyncWrite so that shouldn't be hard to do.
Of course we could keep the current connect
and connect_slave
and just add connect_slave_from_transport
or something like that.
My use case for that:
- doing some connecting setup before starting working with tokio-modbus, I have connections where I first need to send a 'login' packet to have access to modbus
- running modbus-tcp over udp, not a typical use case but I sometimes have to do that