Fixes deprecation warning, fixes documentation error.
This commit is contained in:
parent
5310a3044f
commit
1be06ee2de
2 changed files with 4 additions and 3 deletions
|
|
@ -46,7 +46,7 @@ import sockets, os
|
|||
##
|
||||
## An example ``handleAccept`` follows:
|
||||
##
|
||||
## .. code:: nimrod
|
||||
## .. code-block:: nimrod
|
||||
##
|
||||
## var disp: PDispatcher = newDispatcher()
|
||||
## ...
|
||||
|
|
|
|||
|
|
@ -537,8 +537,9 @@ proc acceptAddr*(server: TSocket): tuple[client: TSocket, address: string] {.dep
|
|||
|
||||
proc accept*(server: TSocket): TSocket {.deprecated.} =
|
||||
## **Warning**: This function is now deprecated, you shouldn't use it!
|
||||
let (client, a) = acceptAddr(server)
|
||||
return client
|
||||
new(result)
|
||||
var address = ""
|
||||
acceptAddr(server, result, address)
|
||||
|
||||
proc close*(socket: TSocket) =
|
||||
## closes a socket.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue