Add TCP transport
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.
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.
I agree, lets merge it 😊 I will sign the commit as requested.
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.
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.
Thanks for the update, I will have a look ;)