[zeromq-dev] Support multipart with SNDMORE and RCVMORE?
Pieter Hintjens
ph at imatix.com
Mon May 28 10:16:26 CEST 2012
Hi,
If you want to send a file, you need some kind of staging protocol
that will let you send in chunks.
This thread may help you:
http://www.mail-archive.com/zeromq-dev@lists.zeromq.org/msg09064.html
-Pieter
On Sat, May 26, 2012 at 5:19 PM, zhiguo zhao <zhaozg at gmail.com> wrote:
> Hi, all.
>
> Please consider below items.
> I.
> If is a short msg, It can be handle in one time with zmq_send
> and zmq_recv, This will match 80%.
> 2.
> If to process a long message,(may be 1G size) and result is
> short,(just like do a message digest), client can send more times with
> SNDMORE, and server will reply only onces to get result, 2 plus 1 with
> match 98%.
>
> CLIENT ----------------------------------- SERVER
> send(msg_p1, MORE) -> recv
>
> digest(msg_p1)
> send(msg_p2, MORE) -> recv
>
> digest(msg_p2)
> send(msg_pn) -> recv
>
> mdvalue = digest_result(msg_pn)
> recv <----
> send(mdvalue)
> 3.
> If to process a long message and result is long too, just think
> that do 3des-cbc encrypt a big file, It make me fool, I can't find a
> solution.
>
> CLIENT ----------------------------------- SERVER
> send(msg_p1, MORE) -> recv
>
> encrypt(msg_p1) as part1
> ? <-
> send(e_msg_p1,[MORE]) will failed.
>
> send(msg_p2, MORE) -> recv
>
> any advice to help me handle this.
>
> Thanks.
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
More information about the zeromq-dev
mailing list