SignalK / vedirect-serial-usb

18 stars 14 forks source link

fixes to schema and udp , tcp added #27

Closed KEGustafsson closed 3 years ago

KEGustafsson commented 3 years ago

Could you consider these changes to be merged?

tkurki commented 3 years ago

This PR has some problems:

KEGustafsson commented 3 years ago

For closing TCP, I used end in tcp.js but that can be changed to destroy. Is UDP closing OK? At least for my testing both TCP and UDP closing are working OK.

I could add timeout to reconnecting. Is setTimeout with test flag (connection closed on purpose) a proper way to do this? Could you point SK tcp reconnect code?

I could also add couple of lines to readme about added features.

tkurki commented 3 years ago

Ooops, I think I messed up tcp and dgram sockets.

If I can I use somebody else's reconnecting code, get stuff like backoff policies out of the box and maybe less bugs out of the gate https://github.com/SignalK/signalk-server/blob/150d1221da5c8f673b0a9f5cbc2bac0df3cabd10/packages/streams/tcp.js