Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServerSerial types and usage #550

Merged
merged 6 commits into from
Apr 4, 2024
Merged

ServerSerial types and usage #550

merged 6 commits into from
Apr 4, 2024

Conversation

cplepage
Copy link
Contributor

@cplepage cplepage commented Apr 4, 2024

I was looking on how to use the ServerSerial in my TypeScript project, but had to look in the code to figure it out.

This is quickly patched to be able to work with TypeScript, but I'm starting the conversation to make it to the codebase.

Open to comment, feedback and reviews.

Related to #503

@yaacov
Copy link
Owner

yaacov commented Apr 4, 2024

Hi, thank you for the pull request

@@ -253,7 +253,7 @@ class ServerSerial extends EventEmitter {
// remember open sockets
modbus.socks = new Map();

modbus._server.on("open", function() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, can you give some description what this do, and why this change is needed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The open event never gets emitted.
I think it may be because of how ServerSerialPipeHandler works?
But the open event from SerialPort isn't piped and so you never receive an initialized event either.

@yaacov yaacov merged commit 49ecaf3 into yaacov:master Apr 4, 2024
3 checks passed
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