isIpAddress doesn't have any effects, so fix it up to clean up connect.
This commit is contained in:
parent
82803d2871
commit
c179d10897
1 changed files with 2 additions and 2 deletions
|
|
@ -95,7 +95,7 @@ type
|
||||||
address_v4*: array[0..3, uint8] ## Contains the IP address in bytes in
|
address_v4*: array[0..3, uint8] ## Contains the IP address in bytes in
|
||||||
## case of IPv4
|
## case of IPv4
|
||||||
|
|
||||||
proc isIpAddress*(address_str: string): bool
|
proc isIpAddress*(address_str: string): bool {.tags: [].}
|
||||||
proc parseIpAddress*(address_str: string): TIpAddress
|
proc parseIpAddress*(address_str: string): TIpAddress
|
||||||
|
|
||||||
proc isDisconnectionError*(flags: set[SocketFlag],
|
proc isDisconnectionError*(flags: set[SocketFlag],
|
||||||
|
|
@ -504,7 +504,7 @@ proc setSockOpt*(socket: Socket, opt: SOBool, value: bool, level = SOL_SOCKET) {
|
||||||
setSockOptInt(socket.fd, cint(level), toCInt(opt), valuei)
|
setSockOptInt(socket.fd, cint(level), toCInt(opt), valuei)
|
||||||
|
|
||||||
proc connect*(socket: Socket, address: string, port = Port(0),
|
proc connect*(socket: Socket, address: string, port = Port(0),
|
||||||
af: Domain = AF_INET) {.tags: [ReadIOEffect, RootEffect].} =
|
af: Domain = AF_INET) {.tags: [ReadIOEffect].} =
|
||||||
## Connects socket to ``address``:``port``. ``Address`` can be an IP address or a
|
## Connects socket to ``address``:``port``. ``Address`` can be an IP address or a
|
||||||
## host name. If ``address`` is a host name, this function will try each IP
|
## host name. If ``address`` is a host name, this function will try each IP
|
||||||
## of that host name. ``htons`` is already performed on ``port`` so you must
|
## of that host name. ``htons`` is already performed on ``port`` so you must
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue