Fixes for TCP connections and raw data collection.#1
Fixes for TCP connections and raw data collection.#1did-vmonroig wants to merge 3 commits intoMFoster:masterfrom
Conversation
|
Overall these changes are great and much appreciated. However the Serializer is a big part of the library, you could create a serializer that returns what its given. |
|
If unserialize() call is uncommented, an error is generated:
Any idea? |
|
I'll look into it, I think it's nice to have the data come out structured instead of a string but could remove the dependency and have serialization go on outside of the socket library. |
|
Thank you! Right now I'm doing some sort of deserialization but from string. Certainly would be better to do it this new way. |
I'm starting to use this bundle in a project for receiving data frames from SCADA devices. I think they're poorly designed and doesn't close TCP connections properly after a FIN is sent, leaving sockets in LAST_ACK and receiving 0 bytes in readMessages(). This is a fix for this problem.
Also, I had to remove a call to an undefined unserialize(). As I'm using plain bytes, this is OK for me.
Lastly, I've added optional cleaning of messages, as I need complete frames with some 0x0D endings in them.