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

Why used proxySocket.unshift(proxyHead) in ws-incomming js? #821

Open
kspiridonov opened this Issue May 8, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@kspiridonov

kspiridonov commented May 8, 2015

Hi!
I use http_proxy as Websocket proxy layer.
Sometimes i get a error like "object proxySocket has not method unshift...".
And it is true, see https://nodejs.org/docs/v0.8.0/api/net.html#net_class_net_socket: object net.Socket has no method unshift
Why you do this? Is there some hidden sense to do this?
May be I don't understand...

@jcrugzz

This comment has been minimized.

Show comment
Hide comment
@jcrugzz

jcrugzz May 11, 2015

Member

@kspiridonov This version of http-proxy (post 1.0.0) only works with node versions 0.10.x and above.

Member

jcrugzz commented May 11, 2015

@kspiridonov This version of http-proxy (post 1.0.0) only works with node versions 0.10.x and above.

@kspiridonov

This comment has been minimized.

Show comment
Hide comment
@kspiridonov

kspiridonov May 11, 2015

Ok. But in https://nodejs.org/docs/v0.10.0/api/net.html#net_class_net_socket there is no unshift method too. And in 1.0.0 this instruction (proxySocket.unshift(...)) is.

kspiridonov commented May 11, 2015

Ok. But in https://nodejs.org/docs/v0.10.0/api/net.html#net_class_net_socket there is no unshift method too. And in 1.0.0 this instruction (proxySocket.unshift(...)) is.

@jcrugzz

This comment has been minimized.

Show comment
Hide comment
@jcrugzz
Member

jcrugzz commented May 11, 2015

@kspiridonov net.Socket is a stream.Duplex which has an unshift method.

@jcrugzz jcrugzz closed this May 11, 2015

@jcrugzz jcrugzz reopened this May 11, 2015

@jcrugzz

This comment has been minimized.

Show comment
Hide comment
@jcrugzz

jcrugzz May 11, 2015

Member

@kspiridonov please provide a reproducible test case which displays this as an issue

Member

jcrugzz commented May 11, 2015

@kspiridonov please provide a reproducible test case which displays this as an issue

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