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)
|
client = SSLClient(context, io)
|
||||||
while isopen(server) && isopen(io)
|
while isopen(server) && isopen(io)
|
||||||
try
|
try
|
||||||
content = UInt8[]
|
|
||||||
client.io_on_read = (x) -> append!(content, x)
|
|
||||||
(ip, client_port) = Sockets.getpeername(io)
|
|
||||||
while true
|
while true
|
||||||
if isreadable(io) && length(client.write_buf) == 0
|
if isreadable(io) && length(client.write_buf) == 0
|
||||||
# verbose && println("do_read")
|
# verbose && println("do_read")
|
||||||
|
@ -83,7 +80,8 @@ function handle_connection(f, server, context, io, verbose)
|
||||||
# println("HERE")
|
# println("HERE")
|
||||||
OpenSSL.do_sock_read(client)
|
OpenSSL.do_sock_read(client)
|
||||||
end
|
end
|
||||||
f(Connection(server, client), Request(String(content)))
|
f(Connection(server, client),
|
||||||
|
Request(String(client.context.data)))
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue