-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add support for custom streams #1110
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
base: master
Are you sure you want to change the base?
Conversation
@sidorares any initial comments? Is this API compatible with the existing API in mysql2? |
Yes, API is compatible. |
Looks like the test is failing on Node.js 0.6 if you can take a look into it. |
Yep, I saw that failure--I'll look into it. I'll see about writing a pool test too. I don't think it'll be an issue since I'm only using a function for this option (mysql2 takes either a stream or a function), but I haven't thought too deeply about the full connection lifecycle and could be overlooking something. Anyways, thanks for the feedback and have a good weekend! |
You, too! In fact, I looked a bit, and I think the issue is because you are using |
var common = require('../../common'); | ||
|
||
function streamFactory() { | ||
return Net.connect({port: common.fakeServerPort}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Net.createConnection
instead of Net.connect
for Node.js 0.6
Heya, I updated the test to use As for testing pools goes: It looks like pools are only tested at the unit level (which uses a mock connection), and all of the integration tests are at the connection level. Shall I go ahead and add a |
Any word on this pull request? I'll gladly add some tests if need be, but like I said, might be outside of the scope of this patch. FWIW I figured whomever was looking at this went on vacation or something and forgot, and I kind of forgot as our API has been humming along on my fork, uneventfully (well, at least WRT the database library ;)). |
5847ec8
to
be37e88
Compare
65c4c0c
to
fa96a75
Compare
638d79d
to
88bade0
Compare
can show any example? |
946727b
to
37fbbdd
Compare
🎂 |
Is the TCP/ IP over SSH support is available now? |
Hello,
I needed to connect to a SOCKS proxy, as in #725, so I added a
stream
option similar to themysql2
library. It only takes a factory function right now; I could add support for a plain stream, but that seems like a more unusual use case than typical.I basically copied the socket connection test, because that seemed most appropriate. Let me know if you'd like me to DRY that up, or if you have feedback on anything else.