diff options
author | Araq <rumpf_a@web.de> | 2011-09-24 20:22:53 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-09-24 20:22:53 +0200 |
commit | 0f37d0e1f2aeee466b3c6179886963354eaa6222 (patch) | |
tree | 51ae4183dabd454877d7570cafb7f72dcf519011 /lib/impure/ssl.nim | |
parent | 485c371942cbbb1f9a10c64b6fcc699e59511460 (diff) | |
download | Nim-0f37d0e1f2aeee466b3c6179886963354eaa6222.tar.gz |
sockets.recv optimizations; stdlib now supports taint mode
Diffstat (limited to 'lib/impure/ssl.nim')
-rwxr-xr-x | lib/impure/ssl.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/impure/ssl.nim b/lib/impure/ssl.nim index ab53d0538..80e75f726 100755 --- a/lib/impure/ssl.nim +++ b/lib/impure/ssl.nim @@ -50,11 +50,11 @@ proc connect*(sock: var TSecureSocket, address: string, result = SSL_get_verify_result(sock.ssl) -proc recvLine*(sock: TSecureSocket, line: var string): bool = +proc recvLine*(sock: TSecureSocket, line: var TaintedString): bool = ## Acts in a similar fashion to the `recvLine` in the sockets module. ## Returns false when no data is available to be read. ## `Line` must be initialized and not nil! - setLen(line, 0) + setLen(line.string, 0) while True: var c: array[0..0, char] var n = BIO_read(sock.bio, c, c.len) @@ -66,7 +66,7 @@ proc recvLine*(sock: TSecureSocket, line: var string): bool = elif n <= 0: return False elif c[0] == '\L': return True - add(line, c) + add(line.string, c) proc send*(sock: TSecureSocket, data: string) = |