Closed slundberg closed 9 years ago
Frankly I think the base julia version should also return a bytearray (maybe so should readall).
Ah. Well I don't have any opinion about which is best, but it would be nice to have them consistent eventually.
Just to follow up - perhaps this was not the way you wanted things to go, but readall()
now mimics readavailable()
in that it returns an array of UInt8.
I'll close this out for now (trying to tidy up some old issues) - but please feel free to open a new issue if you'd still like to discuss. Thanks.
The standard readavailable() function in base Julia uses takebuf_string() and so returns a string, however the readavailable() in GnuTLS uses takebuf_array and so returns an array of Uint8 values. This can be a bit confusing, especially since readall() returns a string in both base julia and GnuTLS.
Not sure if this was an intentional choice, but I wanted to mention it since it took a few minutes to figure why a switching readall() to readavailable() in the given GnuTLS example didn't won't like I expected. Thanks for the great package!