molnarg / node-http2

An HTTP/2 client and server implementation for node.js
MIT License
1.79k stars 185 forks source link

Question: Streams and Multiplexing #169

Closed devilFruit007 closed 8 years ago

devilFruit007 commented 8 years ago

Hi everybody,

I have a problem: I try to develop a http/2 client and http/2 server with multiple request in Node.js (streams and multiplexing). How does it function?

My server offers many String messages. In Client I also try to develop the priority but I don't know how does it function... My Client should send multiple request with priority to the server! the server must send String messages to the client. My server offers many String messages and my client must request to the server.

nwgh commented 8 years ago

Multiplexing is done via "magic" (internal details) inside node-http2. If you wish to set priority on a request made via node-http2, use "http2.request" and then call setPriority on the object returned from the call to "http2.request".