@@ -11,7 +11,7 @@ using Sockets
11
11
using MbedTLS: SSLContext, MbedException
12
12
using OpenSSL: SSLStream
13
13
14
- export bytes, isbytes, nbytes, ByteView, nobytes,
14
+ export bytes, isbytes, nbytes, nobytes,
15
15
startwrite, closewrite, startread, closeread, readuntil,
16
16
tcpsocket, localport, safe_getpeername
17
17
@@ -104,7 +104,6 @@ function safe_getpeername(io)
104
104
end
105
105
106
106
107
- const ByteView = typeof (view (UInt8[], 1 : 0 ))
108
107
const nobytes = view (UInt8[], 1 : 0 )
109
108
110
109
readuntil (args... ) = Base. readuntil (args... )
@@ -114,8 +113,8 @@ Read from an `IO` stream until `find_delimiter(bytes)` returns non-zero.
114
113
Return view of bytes up to the delimiter.
115
114
"""
116
115
function readuntil (buf:: IOBuffer ,
117
- find_delimiter:: F #= Vector{UInt8} -> Int =#
118
- ):: ByteView where {F <: Function }
116
+ find_delimiter:: F #= Vector{UInt8} -> Int =#
117
+ ) where {F <: Function }
119
118
l = find_delimiter (view (buf. data, buf. ptr: buf. size))
120
119
if l == 0
121
120
return nobytes
0 commit comments