summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/pure/asyncio.nim7
-rw-r--r--tests/async/tasynciossl.nim4
-rw-r--r--tests/async/tasyncudp.nim6
3 files changed, 12 insertions, 5 deletions
diff --git a/lib/pure/asyncio.nim b/lib/pure/asyncio.nim
index 4c25952a8..d40c3849e 100644
--- a/lib/pure/asyncio.nim
+++ b/lib/pure/asyncio.nim
@@ -10,6 +10,11 @@ include "system/inclrtl"
 
 import sockets, os
 
+##
+## **Warning:** This module is deprecated since version 0.10.2.
+## Use the brand new `asyncdispatch <asyncdispatch.html>`_ module together
+## with the `asyncnet <asyncnet.html>`_ module.
+
 ## This module implements an asynchronous event loop together with asynchronous
 ## sockets which use this event loop.
 ## It is akin to Python's asyncore module. Many modules that use sockets
@@ -90,6 +95,8 @@ import sockets, os
 ##      var client: Socket
 ##      getSocket(s).accept(client)
 
+{.deprecated.}
+
 when defined(windows):
   from winlean import TimeVal, SocketHandle, FD_SET, FD_ZERO, TFdSet,
     FD_ISSET, select
diff --git a/tests/async/tasynciossl.nim b/tests/async/tasynciossl.nim
index b0222e4ff..118b9e74d 100644
--- a/tests/async/tasynciossl.nim
+++ b/tests/async/tasynciossl.nim
@@ -47,7 +47,7 @@ proc serverAccept(s: PAsyncSocket) =
 proc launchSwarm(disp: var PDispatcher, port: TPort, count: int,
                  buffered = true, useSSL = false) =
   for i in 1..count:
-    var client = AsyncSocket()
+    var client = asyncSocket()
     when defined(ssl):
       if useSSL:
         ctx1.wrapSocket(client)
@@ -56,7 +56,7 @@ proc launchSwarm(disp: var PDispatcher, port: TPort, count: int,
     client.connect("localhost", port)
 
 proc createSwarm(port: TPort, buffered = true, useSSL = false) =
-  var server = AsyncSocket()
+  var server = asyncSocket()
   when defined(ssl):
     if useSSL:
       ctx.wrapSocket(server)
diff --git a/tests/async/tasyncudp.nim b/tests/async/tasyncudp.nim
index fd7f3d568..2a7ed40bf 100644
--- a/tests/async/tasyncudp.nim
+++ b/tests/async/tasyncudp.nim
@@ -42,14 +42,14 @@ proc swarmConnect(s: PAsyncSocket) =
 proc createClient(disp: var PDispatcher, port: TPort,
                   buffered = true) =
   currentClient.inc()
-  var client = AsyncSocket(typ = SOCK_DGRAM, protocol = IPPROTO_UDP,
+  var client = asyncSocket(typ = SOCK_DGRAM, protocol = IPPROTO_UDP,
                            buffered = buffered)
   client.handleConnect = swarmConnect
   disp.register(client)
   client.connect("localhost", port)
 
 proc createServer(port: TPort, buffered = true) =
-  var server = AsyncSocket(typ = SOCK_DGRAM, protocol = IPPROTO_UDP,
+  var server = asyncSocket(typ = SOCK_DGRAM, protocol = IPPROTO_UDP,
                            buffered = buffered)
   server.handleRead = serverRead
   disp.register(server)
@@ -75,4 +75,4 @@ while true:
     break
 
 assert msgCount == messagesToSend * serverCount * swarmSize
-echo(msgCount)
\ No newline at end of file
+echo(msgCount)