demexp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Demexp-dev] How to get through the network an unknown amount of data?


From: David MENTRE
Subject: [Demexp-dev] How to get through the network an unknown amount of data?
Date: Wed, 08 Sep 2004 21:51:16 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Hello,

At several point of the demexp network protocol, I need to get an a
priori unknown amount of data. For example, the list of participants or
the list of Questions in the database.

It would be stupid to get all the data in one (potentially very big)
message. So I'm wondering what would be the best API to do that.

One obvious answer would be to use an API similar to Unix API to list
files in a directory:

 - a function start_listing() to start the listing;

 - a function continue_listing() to have the let's say next 10
   items of the listing.

However, I'm wondering if such a design would play nicely with OCaml
data structures like Hashtbl? Any idea how to stop and restart an
iter-like operation on an OCaml Hashtbl.t?

Any idea of a better design?


Yours,
d.
-- 
 David Mentré <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]