summary refs log tree commit diff stats
path: root/tests/async/tnewasyncudp.nim
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2017-06-06 21:19:50 +0200
committerArne Döring <arne.doering@gmx.net>2017-07-24 23:21:51 +0200
commitddea990a70606aaa19513510ae4b47ada7e49fe9 (patch)
tree35a9788f567fb155546a6a4318edc786ae5fdfbe /tests/async/tnewasyncudp.nim
parent0852be2dec72406c8d9c93e094a8907b52d1aa5a (diff)
downloadNim-ddea990a70606aaa19513510ae4b47ada7e49fe9.tar.gz
removed newString proc again, reverted some unnecesary changes
Diffstat (limited to 'tests/async/tnewasyncudp.nim')
-rw-r--r--tests/async/tnewasyncudp.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/async/tnewasyncudp.nim b/tests/async/tnewasyncudp.nim
index bf54c0d06..da731f4b8 100644
--- a/tests/async/tnewasyncudp.nim
+++ b/tests/async/tnewasyncudp.nim
@@ -54,7 +54,7 @@ proc launchSwarm(name: ptr SockAddr) {.async.} =
     k = 0
     while k < messagesToSend:
       zeroMem(addr(buffer[0]), 16384)
-      zeroMem(cast[pointer](addr(saddr)), sizeof(Sockaddr_in))      
+      zeroMem(cast[pointer](addr(saddr)), sizeof(Sockaddr_in))
       var message = "Message " & $(i * messagesToSend + k)
       await sendTo(sock, addr message[0], len(message),
                    name, sizeof(Sockaddr_in).SockLen)
@@ -62,7 +62,7 @@ proc launchSwarm(name: ptr SockAddr) {.async.} =
                                     16384, cast[ptr SockAddr](addr saddr),
                                     addr slen)
       size = 0
-      var grammString = $buffer
+      var grammString = $buffer.cstring
       if grammString == message:
         saveSendingPort(sockport)
         inc(recvCount)
@@ -84,7 +84,7 @@ proc readMessages(server: AsyncFD) {.async.} =
                                   16384, cast[ptr SockAddr](addr(saddr)),
                                   addr(slen))
     size = 0
-    var grammString = $buffer
+    var grammString = $buffer.cstring
     if grammString.startswith("Message ") and
        saddr.sin_addr.s_addr == 0x100007F:
       await sendTo(server, addr grammString[0], len(grammString),