>
> While doing some more experiments, I arrived at a question about TCP 
> streams; they are declared as a Producer[ByteString] and a 
> Consumer[ByteString].
> The question is, are the ByteString instances sent by the server to the 
> TCP consumer treated as discrete messages, or a continuous stream of bytes 
> which can arrive in arbitrary chunks to the consumer?
>
>
> TCP does not support datagram boundaries (that is what UDP does), it is 
> just a stream of bytes which you get from the socket in arbitrary chunks 
> (as defined by the operating system).
>

Ah, so it's just raw TCP. Thanks! 

> From what I have seen, on the client side I sometimes get a "single" 
> ByteString (exactly as sent by the server), sometimes multiple, 
> concatenated. Is it possible to receive only a chunk? Meaning that I should 
> do the chunk re-combination by hand?
>
>
> You will typically need to add a custom framing protocol (e.g. by 
> prepending a length field to every message).
>

Right, framing, that's the word I've been missing :)

Adam 

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to