[Oberon] XMLRPC Implementation

Thomas Frey frey at inf.ethz.ch
Fri Jun 27 20:44:26 CEST 2003


> My first thought for sending the XML accross the net
> was to implement an AosIO.Writer with an
> AosTCP.Connection.Send delegate.  But that simply
> didn't work.
What is the problem with that ? HTTP/FTP/SMTP/QUOTE/etc.
all use a AosIO Writer on a TCP sonnection. (Did you maybe miss
the AosIO.Writer.Update ?

> Plus I noticed that AosIO.Writer.String
> makes repeated calls to the Send delegate proceder
> (one for each charecter in the string).  It's much
> better in this instance to send all of the bytes in a
> group, so I called Send directly.
The AosIO.Writer.String only calls AosIO.Writer.Char for each
character, not Send. This then only calls the Send delegate if its buffer is
full. So
sending (more than one) string/integer/etc. is probably faster via
the AosIO.Writer since the number of network packets is reduced,
compared to calling AosTCP.Connection.Send manually. The overhead
of adding thousands of Char to the buffer is minimal compared to wasting one
single network packet (at least for computers with more than very few MHz)

--Thomas





More information about the Oberon mailing list