Hey,
simple question and how can I do it ? I want to do a get http request to a server - but this server does not close the connection, but sends information on a line-by-line state (CouchDB, continuous polling). Instances of SstHttpClient come back when they have all content received. I would like to have a notification based on each line of data. Is this possible ???? -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk?hl=en. For more options, visit https://groups.google.com/groups/opt_out. |
Ok, my question is now much better: does the HttpClient supports chunked transfer encoding and how does it work ?
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk?hl=en. For more options, visit https://groups.google.com/groups/opt_out. |
Hello Marten,
Since 8.5, VA Smalltalk has had capability added to assemble an incoming Http message that is chunked transfer encoded. However, it does not have the ability to signal when each chunk has arrived. See the class SstHttpAssembler and SstHttpChunkedContentAssembler. On Sunday, May 19, 2013 4:44:52 PM UTC-4, Marten Feldtmann wrote: Ok, my question is now much better: does the HttpClient supports chunked transfer encoding and how does it work ?-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk?hl=en. For more options, visit https://groups.google.com/groups/opt_out. |
Ok,
then another question: The SstHttpClient returns from its #receive with the content of the first chunk - how do I get the next chunks ???? -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk?hl=en. For more options, visit https://groups.google.com/groups/opt_out. |
In the cases I've seen all chunks have been concatenated onto the socket stream before the receive returned. How big is your first chunk?
Would you mind opening a support case and sending more context so we can take a closer look at what is going on? Thanks. On Thursday, May 23, 2013 5:11:55 PM UTC-4, Marten Feldtmann wrote: Ok,-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk?hl=en. For more options, visit https://groups.google.com/groups/opt_out. |
The use case is the continuous polling technology of the CouchDB from Apache. They use the chunked data transfer for their clients to be informed about changes in the databases, they themselves use this for their replication path. Pretty clever way - or a pretty clever usage pattern of the http standard.
The http socket connection stays open "forever" - and the CouchDB sends changing information over this open socket conection to their "clients". It behaves therefore more like a stream. The sizes of the chunks may vary from 1 byte (new line only - e.g. heartsbeats) to pretty much data (including complee documents). Even the first chunk may be only 10 bytes small. -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk?hl=en. For more options, visit https://groups.google.com/groups/opt_out. |
Thanks for giving the detailed context Marten. At first I thought there might be a buffer size problem if a very large chunk had been sent but that does not appear to be the case based on your information.
On Saturday, May 25, 2013 2:19:37 AM UTC-4, Marten Feldtmann wrote: The use case is the continuous polling technology of the CouchDB from Apache. They use the chunked data transfer for their clients to be informed about changes in the databases, they themselves use this for their replication path. Pretty clever way - or a pretty clever usage pattern of the http standard.-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk?hl=en. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |