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

Add utility to wrap a WebSocket in a Duplex stream #1589

Merged
merged 1 commit into from Jul 8, 2019
Merged

Add utility to wrap a WebSocket in a Duplex stream #1589

merged 1 commit into from Jul 8, 2019

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Jun 16, 2019

I'm not sure if it make sense to add this but reasons for doing it are:

stream.js Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
stream.js Outdated Show resolved Hide resolved
@lpinca
Copy link
Member Author

lpinca commented Jun 17, 2019

@3rd-Eden PTAL.

@chainhead
Copy link

How do we read the stream into ws.send()?

This option keeps hitting the event emitter limit - not sure why.

duplex.on('data', (chunk) => {
  ws.send(chunk.toString())
}

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.

None yet

3 participants