From d2fbf40c4915fbe22669374ed88f2f5d70b400f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20St=C3=B6r?= Date: Thu, 26 Jan 2017 23:43:35 +0100 Subject: [PATCH] Add UDP-related deprecation notes, partially fixes #1762 --- docs/en/modules/net.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/en/modules/net.md b/docs/en/modules/net.md index 598e50b5..6537f0a7 100644 --- a/docs/en/modules/net.md +++ b/docs/en/modules/net.md @@ -19,6 +19,11 @@ Creates a client. - `type` `net.TCP` or `net.UDP`. UDP connections chained to [net.createUDPSocket()](#netcreateudpsocket) - `secure` 1 for encrypted, 0 for plain. Secure connections chained to [tls.createConnection()](tls.md#tlscreateconnection) +!!! attention + This will change in upcoming releases so that `net.createConnection` will always create an unencrypted TCP connection. + + There's no such thing as a UDP _connection_ because UDP is connection*less*. Thus no connection `type` parameter should be required. For UDP use [net.createUDPSocket()](#netcreateudpsocket) instead. To create *secure* connections use [tls.createConnection()](tls.md#tlscreateconnection) instead. + #### Returns - for `net.TCP` - net.socket sub module @@ -45,6 +50,9 @@ Creates a server. - `type` `net.TCP` or `net.UDP`. UDP connections chained to [net.createUDPSocket()](#netcreateudpsocket) - `timeout` for a TCP server timeout is 1~28'800 seconds (for an inactive client to be disconnected) +!!! attention + The `type` parameter will be removed in upcoming releases so that `net.createServer` will always create a TCP-based server. For UDP use [net.createUDPSocket()](#netcreateudpsocket) instead. + #### Returns - for `net.TCP` - net.server sub module