[m-rev.] for review: improvements to net/tcp.m
Ian MacLarty
maclarty at csse.unimelb.edu.au
Thu Mar 29 14:04:55 AEST 2007
On Thu, Mar 29, 2007 at 12:34:44PM +1000, Peter Wang wrote:
> On 28/03/07, Ian MacLarty <maclarty at csse.unimelb.edu.au> wrote:
> >On Wed, Mar 28, 2007 at 05:05:39PM +1000, Julien Fischer wrote:
> >>
> >> Actually you should probably define:
> >>
> >> :- type line ---> line(string).
> >>
> >> and use that in instance instead of just a raw string. We were
> >> planning to add something like the above to the io module anyway,
> >> so it may be a good time work out the details.
> >>
> >
> >What about giving a block size when you initialize the tcp socket
> >and then having stream.get/4 return strings of this length?
> >
> >Breaking the data up on lines seems a bit arbitrary to me. It's
> >possible that there are no line breaks in the data, which means it will
> >all be read into one big string, which could be a performance problem.
>
> And a DOS vulnerability. However lines are very common units and it's
> worth providing a correct and efficient implementation. We could
> allow the user to specify a maximum expected line length.
Sure, I'm just saying that a 'chunk' unit would also be useful.
Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list