Because its mostly a hack. You may want to take a look at how node-spdy handles similar problem: https://github.com/indutny/node-spdy
Cheers, Fedor. On Sun, Jul 14, 2013 at 12:50 AM, Daniel Lamando <[email protected]> wrote: > Well that seems obvious enough - the event is even listed in the http > module's docs, but it's not mentioned that emitting it works like that. > I'll try it > > On Friday, July 12, 2013 5:21:23 PM UTC-4, Ben Noordhuis wrote: > >> On Fri, Jul 12, 2013 at 2:59 AM, Daniel Lamando <[email protected]> >> wrote: >> > Hey all, >> > >> > I hope this question is appropriate for this forum, as I've been >> attempting >> > to google my issue but haven't gotten very far. >> > >> > I am running a TLS server and offering a few protocols via NPN, one of >> which >> > is http/1.1. When clients request http/1.1 I want to provide a normal >> HTTP >> > server to them, with the goal of hosting a websocket interface (e.g. >> with >> > the ws module). >> > >> > NPN and TLS are working great, but now that I have a TLS stream waiting >> for >> > HTTP to happen, I can't figure out for the life of me how to give that >> > stream to the http module for processing and potentially handing off a >> > request to ws. Am I missing something in the API, or will I basically >> have >> > to do all of the http and websocket work myself? >> > >> > Thanks for your time. >> >> If the TLS stream conforms to the net.Socket interface, you can feed >> it to your http.Server instance with server.emit('connection', >> socket). >> > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
