let SSLClient store received data
This commit is contained in:
parent
ba05db91fe
commit
eef996857d
|
@ -58,9 +58,6 @@ function handle_connection(f, server, context, io, verbose)
|
|||
client = SSLClient(context, io)
|
||||
while isopen(server) && isopen(io)
|
||||
try
|
||||
content = UInt8[]
|
||||
client.io_on_read = (x) -> append!(content, x)
|
||||
(ip, client_port) = Sockets.getpeername(io)
|
||||
while true
|
||||
if isreadable(io) && length(client.write_buf) == 0
|
||||
# verbose && println("do_read")
|
||||
|
@ -83,7 +80,8 @@ function handle_connection(f, server, context, io, verbose)
|
|||
# println("HERE")
|
||||
OpenSSL.do_sock_read(client)
|
||||
end
|
||||
f(Connection(server, client), Request(String(content)))
|
||||
f(Connection(server, client),
|
||||
Request(String(client.context.data)))
|
||||
break
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue