Code Monkey home page Code Monkey logo

Comments (3)

max-mapper avatar max-mapper commented on September 17, 2024

Ah, so you have a WebSocket instance already and want to pass it into the
websocket-stream constructor? The way the code is written it only works
like that for server-side WebSocket objects (via the ws npm package).
Instead of the two states (is object or not) there would have to be 3:

If you wanna fork it I'd happily merge this pull request

On Fri, May 3, 2013 at 1:21 AM, David Feinberg [email protected]:

I'm trying to connect to a websocket server through an existing ssh streamhttps://github.com/mscdex/ssh2.
Client and server are both running node but one is on a remote server only
accessible through ssh (via port forwarding).

Can the initial connection happen over an existing stream while still
capturing a reference to it?


Reply to this email directly or view it on GitHubhttps://github.com//issues/5
.

from websocket-stream.

rawberg avatar rawberg commented on September 17, 2024

The stream instance I have initially is an ssh tunnel setup via ssh2. Seems like I would need to establish the websocket connection inside the existing ssh stream and then pipe all further data from the websocket stream to the ssh stream.

I'm just unsure how to establish the websocket connection over the existing ssh stream.... Any ideas, seems different than if I had an existing websocket instance.

I was thinking of writing the websocket connection request header into the existing stream and then creating a websocket instance from the response that I get back from the server. But it doesn't seem like websockets allow for that...

from websocket-stream.

max-mapper avatar max-mapper commented on September 17, 2024

Ahh yea I have no idea about that, I've never used ssh2 in the browser

On Fri, May 3, 2013 at 11:28 AM, David Feinberg [email protected]:

The stream instance I have initially is an ssh tunnel setup via ssh2https://github.com/mscdex/ssh2.
Seems like I would need to establish the websocket connection inside the
existing ssh stream and then pipe all further data from the websocket
stream to the ssh stream.

I'm just unsure how to establish the websocket connection over the
existing ssh stream.... Any ideas, seems different than if I had an
existing websocket instance.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-17410422
.

from websocket-stream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.