Skip to content

Fixes for TCP connections and raw data collection.#1

Open
did-vmonroig wants to merge 3 commits intoMFoster:masterfrom
did-vmonroig:master
Open

Fixes for TCP connections and raw data collection.#1
did-vmonroig wants to merge 3 commits intoMFoster:masterfrom
did-vmonroig:master

Conversation

@did-vmonroig
Copy link

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.

@MFoster
Copy link
Owner

MFoster commented Aug 9, 2016

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.

@did-vmonroig
Copy link
Author

If unserialize() call is uncommented, an error is generated:

[Symfony\Component\Debug\Exception\UndefinedMethodException]
Attempted to call an undefined method named "unserialize" of class "Symfony\Component\Serializer\Serializer".
Did you mean to call e.g. "deserialize" or "serialize"?

Any idea?

@MFoster
Copy link
Owner

MFoster commented Aug 18, 2016

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.

@did-vmonroig
Copy link
Author

Thank you! Right now I'm doing some sort of deserialization but from string. Certainly would be better to do it this new way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants