Brian Smith a �crit : > On Fri, 12 Sep 2003, Luc Le Blanc wrote: > > > Is there any good example of such multiple object beaming in pre-OS 4.0 > > available somewhere? > > The book _Palm Programming: The Developer's Guide_ from O'Reilly has a few > great examples of multi-record beaming, using no special 4.0+ features. > You can probably get access to the book online through their site if you > don't have the printed version, or you can buy that.
I own that book (on paper). > I've used a > variation on their example in some of my code, and it's worked very well. Did you try multiple records beaming on OS 3.5? The book does not mention anything about OS 4.0 but the Palm OS Reference states that ExgSend could not be used to send multiple objects before OS 4.0. I understand this means that once connected, I'm allowed to call ExgSend repeatedly only until I've sent the byte count I indicated when opening the socket. Since I don't know prior to sending how many bytes I want to send, I would have to open the scokect with the size of the first record, call ExgSend until the first record is sent, disconnect, and repeat the operation for the next record. Or am I missing something? If so, what is this warning about multiple objects and OS 4.0? > Basically what they do is send a record count then, for each record, a > size value and then the record itself. There's no memory allocated to > hold a single record or the entire set... the data is beamed straight from > the database records. The receiver knows how much is coming and will wait > for it... there's no reason to send it all at once. There's matching > receive code in the book that handles single- and multi-record beaming, > based on the corresponding sender functions. I would have to see that run under OS 3.5. -- Luc Le Blanc -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
