thanks,

the problem I have is that the messages contain binary data.

Paul

----- Original Message ----- From: "RTT" <p...@sapo.pt>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Wednesday, February 03, 2010 12:39 PM
Subject: Re: [twsocket] Send data as a never ending document



Are you using chunked transfer encoding, or something else?
That's what I'm doing, at least I'm trying to, but it's still not working.
Do you have an example sending it with a THttpCli ?
No, just with httpserver. Are you able to properly set up the encoding, or it just don't work as you want, and the connection continues to close.
Here is how I, generically, made it

...

   Header := 'HTTP/1.1 200 OK' + crlf;
   Header := Header + 'Connection: keep-alive' + crlf;
   Header := Header + 'Transfer-Encoding: chunked' + crlf;
   HttpConnection.SendStr(Header + crlf);
   s := IntToHex(BufLen, 2) + crlf;
   HttpConnection.Send(@s[1], Length(s));
   HttpConnection.Send(buf, BufLen)
   HttpConnection.Send(@crlf[1], 2)


And you have to repeat the above code until all data you need to send is sent.
When all sent:

   s := '0' + crlf + crlf;
   HttpConnection.send(@s[1], length(s));

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to