@@ -24,8 +24,11 @@ be emitted either by client-side code or server-side code.
2424
2525### Server-side example
2626
27- The following illustrates a simple, plain-text HTTP/2 server using the
28- Core API:
27+ The following illustrates a simple HTTP/2 server using the Core API.
28+ Since there are no browsers known that support
29+ [ unencrypted HTTP/2] [ HTTP/2 Unencrypted ] , the use of
30+ [ ` http2.createSecureServer() ` ] [ ] is necessary when communicating
31+ with browser clients.
2932
3033``` js
3134const http2 = require (' http2' );
@@ -252,7 +255,7 @@ and would instead register a handler for the `'stream'` event emitted by the
252255``` js
253256const http2 = require (' http2' );
254257
255- // Create a plain-text HTTP/2 server
258+ // Create an unencrypted HTTP/2 server
256259const server = http2 .createServer ();
257260
258261server .on (' stream' , (stream , headers ) => {
@@ -1727,10 +1730,18 @@ changes:
17271730Returns a ` net.Server ` instance that creates and manages ` Http2Session `
17281731instances.
17291732
1733+ Since there are no browsers known that support
1734+ [ unencrypted HTTP/2] [ HTTP/2 Unencrypted ] , the use of
1735+ [ ` http2.createSecureServer() ` ] [ ] is necessary when communicating
1736+ with browser clients.
1737+
17301738``` js
17311739const http2 = require (' http2' );
17321740
1733- // Create a plain-text HTTP/2 server
1741+ // Create an unencrypted HTTP/2 server.
1742+ // Since there are no browsers known that support
1743+ // unencrypted HTTP/2, the use of `http2.createSecureServer()`
1744+ // is necessary when communicating with browser clients.
17341745const server = http2 .createServer ();
17351746
17361747server .on (' stream' , (stream , headers ) => {
@@ -3085,6 +3096,7 @@ following additional properties:
30853096[ Compatibility API ] : #http2_compatibility_api
30863097[ HTTP/1 ] : http.html
30873098[ HTTP/2 ] : https://tools.ietf.org/html/rfc7540
3099+ [ HTTP/2 Unencrypted ] : https://http2.github.io/faq/#does-http2-require-encryption
30883100[ HTTP2 Headers Object ] : #http2_headers_object
30893101[ HTTP2 Settings Object ] : #http2_settings_object
30903102[ HTTPS ] : https.html
0 commit comments