Hi,
I have been trying to keep the HTTP connection open and sending the HTTP response in chunked mode, but it seemsit is not working.
Thanks
I have been trying to keep the HTTP connection open and sending the HTTP response in chunked mode, but it seemsit is not working.
B4X:
Dim bc As ByteConverter
resp.SetHeader("Content-Length", 0)
resp.SetHeader("Transfer-Encoding", "chunked")
resp.OutputStream.InitializeToBytesArray(0)
Do While (1=1)
Dim ch() As Byte = bc.StringToBytes(CRLF & "1" & CRLF & "A" & CRLF, "ASCII")
resp.OutputStream.WriteBytes(ch,0 ,ch.Length)
resp.OutputStream.Flush
Dim waitUntil As Long = DateTime.Now + 5000
Do While (waitUntil < DateTime.Now)
Loop
Loop
Thanks