Rename rawsockets module to nativesockets
This change was done to avoid confusion with TCP/IP raw sockets. Native sockets module represents handling native system low level socket API in general and is not just limited anyhow to TCP/IP raw sockets. A stub lib/deprecated/pure/rawsockets.nim module has been added as compatibility layer for old code using rawsockets, so this change will not break existing code.
This commit is contained in:
parent
3fe5731777
commit
be991ed413
16 changed files with 91 additions and 65 deletions
|
|
@ -81,7 +81,7 @@
|
|||
|
||||
import net, strutils, uri, parseutils, strtabs, base64, os, mimetypes, math
|
||||
import asyncnet, asyncdispatch
|
||||
import rawsockets
|
||||
import nativesockets
|
||||
|
||||
type
|
||||
Response* = tuple[
|
||||
|
|
@ -764,10 +764,10 @@ proc newConnection(client: AsyncHttpClient, url: Uri) {.async.} =
|
|||
let port =
|
||||
if url.port == "":
|
||||
if url.scheme.toLower() == "https":
|
||||
rawsockets.Port(443)
|
||||
nativesockets.Port(443)
|
||||
else:
|
||||
rawsockets.Port(80)
|
||||
else: rawsockets.Port(url.port.parseInt)
|
||||
nativesockets.Port(80)
|
||||
else: nativesockets.Port(url.port.parseInt)
|
||||
|
||||
if url.scheme.toLower() == "https":
|
||||
when defined(ssl):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue