cannelloni icon indicating copy to clipboard operation
cannelloni copied to clipboard

Add TCP transport

Open simontegelid opened this issue 3 years ago • 2 comments

This commit adds TCP transport, and thus resolves #20. I realize that the code would do good with some refactoring since there is a lot of copy/paste between UDP, TCP and SCTP. Anyway, the transport works as intended.

simontegelid avatar Feb 16 '22 12:02 simontegelid

Thanks for your contribution, Simon :tada: I pushed a change that simplifies the presence check of remote IP. It's required only for UDP, not for SCTP and TCP. The original code also checked for it when using TCP if compiled without SCTP support.

As for the refactoring, I agree that the architecture around the IP + CAN threads deserves some work. But I suggest to merge it as is since it will be easier to refactor once all three major protocols are supported and the code duplication is obvious.

mguentner avatar Feb 19 '22 15:02 mguentner

I agree, lets merge it 😊 I will sign the commit as requested.

simontegelid avatar Feb 19 '22 15:02 simontegelid

I will close this. A solution with a protocol that takes the points in https://github.com/mguentner/cannelloni/pull/38#discussion_r810511753 into account should be submitted and discussed in a new PR.

mguentner avatar Feb 27 '23 19:02 mguentner

Sorry for vanishing from this. I did what I said a year ago and just let TCP handle the streaming of data, without much other logic added to it. Available here https://github.com/simontegelid/tcpcan and on pypi.

simontegelid avatar Feb 27 '23 20:02 simontegelid

Thanks for the update, I will have a look ;)

mguentner avatar Feb 27 '23 20:02 mguentner