Don't export readInto* templates
This commit is contained in:
parent
e127ed77b1
commit
836819d6b6
1 changed files with 2 additions and 2 deletions
|
|
@ -182,7 +182,7 @@ proc connect*(socket: AsyncSocket, address: string, port: Port,
|
||||||
sslSetConnectState(socket.sslHandle)
|
sslSetConnectState(socket.sslHandle)
|
||||||
sslLoop(socket, flags, sslDoHandshake(socket.sslHandle))
|
sslLoop(socket, flags, sslDoHandshake(socket.sslHandle))
|
||||||
|
|
||||||
template readInto*(buf: cstring, size: int, socket: AsyncSocket,
|
template readInto(buf: cstring, size: int, socket: AsyncSocket,
|
||||||
flags: set[SocketFlag]): int =
|
flags: set[SocketFlag]): int =
|
||||||
## Reads **up to** ``size`` bytes from ``socket`` into ``buf``. Note that
|
## Reads **up to** ``size`` bytes from ``socket`` into ``buf``. Note that
|
||||||
## this is a template and not a proc.
|
## this is a template and not a proc.
|
||||||
|
|
@ -200,7 +200,7 @@ template readInto*(buf: cstring, size: int, socket: AsyncSocket,
|
||||||
res = recvIntoFut.read()
|
res = recvIntoFut.read()
|
||||||
res
|
res
|
||||||
|
|
||||||
template readIntoBuf*(socket: AsyncSocket,
|
template readIntoBuf(socket: AsyncSocket,
|
||||||
flags: set[SocketFlag]): int =
|
flags: set[SocketFlag]): int =
|
||||||
var size = readInto(addr socket.buffer[0], BufferSize, socket, flags)
|
var size = readInto(addr socket.buffer[0], BufferSize, socket, flags)
|
||||||
socket.currPos = 0
|
socket.currPos = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue