| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6be4942 commit fdc072b
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -841,82 +841,10 @@ added: v0.1.90 | |||
| 841 | 841 | ||
| 842 | 842 | Stops the server from accepting new connections. See [`net.Server.close()`][]. | |
| 843 | 843 | ||
| 844 | - ### server.listen(handle[, callback]) | ||
| 845 | - <!-- YAML | ||
| 846 | - added: v0.5.10 | ||
| 847 | - --> | ||
| 848 | - | ||
| 849 | - * `handle` {Object} | ||
| 850 | - * `callback` {Function} | ||
| 851 | - | ||
| 852 | - The `handle` object can be set to either a server or socket (anything | ||
| 853 | - with an underlying `_handle` member), or a `{fd: <n>}` object. | ||
| 854 | - | ||
| 855 | - This will cause the server to accept connections on the specified | ||
| 856 | - handle, but it is presumed that the file descriptor or handle has | ||
| 857 | - already been bound to a port or domain socket. | ||
| 858 | - | ||
| 859 | - Listening on a file descriptor is not supported on Windows. | ||
| 860 | - | ||
| 861 | - This function is asynchronous. `callback` will be added as a listener for the | ||
| 862 | - [`'listening'`][] event. See also [`net.Server.listen()`][]. | ||
| 863 | - | ||
| 864 | - Returns `server`. | ||
| 865 | - | ||
| 866 | - *Note*: The `server.listen()` method may be called multiple times. Each | ||
| 867 | - subsequent call will *re-open* the server using the provided options. | ||
| 868 | - | ||
| 869 | - ### server.listen(path[, callback]) | ||
| 870 | - <!-- YAML | ||
| 871 | - added: v0.1.90 | ||
| 872 | - --> | ||
| 873 | - | ||
| 874 | - * `path` {string} | ||
| 875 | - * `callback` {Function} | ||
| 876 | - | ||
| 877 | - Start a UNIX socket server listening for connections on the given `path`. | ||
| 878 | - | ||
| 879 | - This function is asynchronous. `callback` will be added as a listener for the | ||
| 880 | - [`'listening'`][] event. See also [`net.Server.listen(path)`][]. | ||
| 881 | - | ||
| 882 | - *Note*: The `server.listen()` method may be called multiple times. Each | ||
| 883 | - subsequent call will *re-open* the server using the provided options. | ||
| 884 | - | ||
| 885 | - ### server.listen([port][, hostname][, backlog][, callback]) | ||
| 886 | - <!-- YAML | ||
| 887 | - added: v0.1.90 | ||
| 888 | - --> | ||
| 889 | - | ||
| 890 | - * `port` {number} | ||
| 891 | - * `hostname` {string} | ||
| 892 | - * `backlog` {number} | ||
| 893 | - * `callback` {Function} | ||
| 894 | - | ||
| 895 | - Begin accepting connections on the specified `port` and `hostname`. If the | ||
| 896 | - `hostname` is omitted, the server will accept connections on the | ||
| 897 | - [unspecified IPv6 address][] (`::`) when IPv6 is available, or the | ||
| 898 | - [unspecified IPv4 address][] (`0.0.0.0`) otherwise. | ||
| 899 | - | ||
| 900 | - *Note*: In most operating systems, listening to the | ||
| 901 | - [unspecified IPv6 address][] (`::`) may cause the `net.Server` to also listen on | ||
| 902 | - the [unspecified IPv4 address][] (`0.0.0.0`). | ||
| 903 | - | ||
| 904 | - Omit the port argument, or use a port value of `0`, to have the operating system | ||
| 905 | - assign a random port, which can be retrieved by using `server.address().port` | ||
| 906 | - after the `'listening'` event has been emitted. | ||
| 907 | - | ||
| 908 | - To listen to a unix socket, supply a filename instead of port and hostname. | ||
| 909 | - | ||
| 910 | - `backlog` is the maximum length of the queue of pending connections. | ||
| 911 | - The actual length will be determined by the OS through sysctl settings such as | ||
| 912 | - `tcp_max_syn_backlog` and `somaxconn` on linux. The default value of this | ||
| 913 | - parameter is 511 (not 512). | ||
| 914 | - | ||
| 915 | - This function is asynchronous. `callback` will be added as a listener for the | ||
| 916 | - [`'listening'`][] event. See also [`net.Server.listen(port)`][]. | ||
| 844 | + ### server.listen() | ||
| 917 | 845 | ||
| 918 | - *Note*: The `server.listen()` method may be called multiple times. Each | ||
| 919 | - subsequent call will *re-open* the server using the provided options. | ||
| 846 | + Starts the HTTP server listening for connections. | ||
| 847 | + This method is identical to [`server.listen()`][] from [`net.Server`][]. | ||
| 920 | 848 | ||
| 921 | 849 | ### server.listening | |
| 922 | 850 | <!-- YAML | |
@@ -1971,6 +1899,7 @@ const req = http.request(options, (res) => { | |||
| 1971 | 1899 | [`response.write(data, encoding)`]: #http_response_write_chunk_encoding_callback | |
| 1972 | 1900 | [`response.writeContinue()`]: #http_response_writecontinue | |
| 1973 | 1901 | [`response.writeHead()`]: #http_response_writehead_statuscode_statusmessage_headers | |
| 1902 | + [`server.listen()`]: net.html#net_server_listen | ||
| 1974 | 1903 | [`server.timeout`]: #http_server_timeout | |
| 1975 | 1904 | [`setHeader(name, value)`]: #http_request_setheader_name_value | |
| 1976 | 1905 | [`socket.setKeepAlive()`]: net.html#net_socket_setkeepalive_enable_initialdelay | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,19 @@ added: v0.3.4 | |||
| 23 | 23 | This class is a subclass of `tls.Server` and emits events same as | |
| 24 | 24 | [`http.Server`][]. See [`http.Server`][] for more information. | |
| 25 | 25 | ||
| 26 | + ### server.close([callback]) | ||
| 27 | + <!-- YAML | ||
| 28 | + added: v0.1.90 | ||
| 29 | + --> | ||
| 30 | + - `callback` {Function} | ||
| 31 | + | ||
| 32 | + See [`server.close()`][`http.close()`] from the HTTP module for details. | ||
| 33 | + | ||
| 34 | + ### server.listen() | ||
| 35 | + | ||
| 36 | + Starts the HTTPS server listening for encrypted connections. | ||
| 37 | + This method is identical to [`server.listen()`][] from [`net.Server`][]. | ||
| 38 | + | ||
| 26 | 39 | ### server.setTimeout([msecs][, callback]) | |
| 27 | 40 | <!-- YAML | |
| 28 | 41 | added: v0.11.2 | |
@@ -90,30 +103,6 @@ https.createServer(options, (req, res) => { | |||
| 90 | 103 | }).listen(8000); | |
| 91 | 104 | ``` | |
| 92 | 105 | ||
| 93 | - ### server.close([callback]) | ||
| 94 | - <!-- YAML | ||
| 95 | - added: v0.1.90 | ||
| 96 | - --> | ||
| 97 | - - `callback` {Function} | ||
| 98 | - | ||
| 99 | - See [`http.close()`][] for details. | ||
| 100 | - | ||
| 101 | - ### server.listen(handle[, callback]) | ||
| 102 | - - `handle` {Object} | ||
| 103 | - - `callback` {Function} | ||
| 104 | - | ||
| 105 | - ### server.listen(path[, callback]) | ||
| 106 | - - `path` {string} | ||
| 107 | - - `callback` {Function} | ||
| 108 | - | ||
| 109 | - ### server.listen([port][, host][, backlog][, callback]) | ||
| 110 | - - `port` {number} | ||
| 111 | - - `hostname` {string} | ||
| 112 | - - `backlog` {number} | ||
| 113 | - - `callback` {Function} | ||
| 114 | - | ||
| 115 | - See [`http.listen()`][] for details. | ||
| 116 | - | ||
| 117 | 106 | ## https.get(options[, callback]) | |
| 118 | 107 | <!-- YAML | |
| 119 | 108 | added: v0.3.6 | |
@@ -271,6 +260,8 @@ const req = https.request(options, (res) => { | |||
| 271 | 260 | [`http.request()`]: http.html#http_http_request_options_callback | |
| 272 | 261 | [`https.Agent`]: #https_class_https_agent | |
| 273 | 262 | [`https.request()`]: #https_https_request_options_callback | |
| 263 | + [`net.Server`]: net.html#net_class_net_server | ||
| 264 | + [`server.listen()`]: net.html#net_server_listen | ||
| 274 | 265 | [`tls.connect()`]: tls.html#tls_tls_connect_options_callback | |
| 275 | 266 | [`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options | |
| 276 | 267 | [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -408,27 +408,10 @@ added: v3.0.0 | |||
| 408 | 408 | Returns a `Buffer` instance holding the keys currently used for | |
| 409 | 409 | encryption/decryption of the [TLS Session Tickets][] | |
| 410 | 410 | ||
| 411 | - ### server.listen(port[, hostname][, callback]) | ||
| 412 | - <!-- YAML | ||
| 413 | - added: v0.3.2 | ||
| 414 | - --> | ||
| 415 | - | ||
| 416 | - * `port` {number} The TCP/IP port on which to begin listening for connections. | ||
| 417 | - A value of `0` (zero) will assign a random port. | ||
| 418 | - * `hostname` {string} The hostname, IPv4, or IPv6 address on which to begin | ||
| 419 | - listening for connections. If `undefined`, the server will accept connections | ||
| 420 | - on any IPv6 address (`::`) when IPv6 is available, or any IPv4 address | ||
| 421 | - (`0.0.0.0`) otherwise. | ||
| 422 | - * `callback` {Function} A callback function to be invoked when the server has | ||
| 423 | - begun listening on the `port` and `hostname`. | ||
| 424 | - | ||
| 425 | - The `server.listen()` methods instructs the server to begin accepting | ||
| 426 | - connections on the specified `port` and `hostname`. | ||
| 427 | - | ||
| 428 | - This function operates asynchronously. If the `callback` is given, it will be | ||
| 429 | - called when the server has started listening. | ||
| 411 | + ### server.listen() | ||
| 430 | 412 | ||
| 431 | - See [`net.Server`][] for more information. | ||
| 413 | + Starts the server listening for encrypted connections. | ||
| 414 | + This method is identical to [`server.listen()`][] from [`net.Server`][]. | ||
| 432 | 415 | ||
| 433 | 416 | ### server.setTicketKeys(keys) | |
| 434 | 417 | <!-- YAML | |
@@ -1292,6 +1275,7 @@ where `secure_socket` has the same API as `pair.cleartext`. | |||
| 1292 | 1275 | [`net.Server`]: net.html#net_class_net_server | |
| 1293 | 1276 | [`net.Socket`]: net.html#net_class_net_socket | |
| 1294 | 1277 | [`server.getConnections()`]: net.html#net_server_getconnections_callback | |
| 1278 | + [`server.listen()`]: net.html#net_server_listen | ||
| 1295 | 1279 | [`tls.DEFAULT_ECDH_CURVE`]: #tls_tls_default_ecdh_curve | |
| 1296 | 1280 | [`tls.TLSSocket.getPeerCertificate()`]: #tls_tlssocket_getpeercertificate_detailed | |
| 1297 | 1281 | [`tls.TLSSocket`]: #tls_class_tls_tlssocket | |
| Back | FazBrowse Home | New Git URL |
0 commit comments