k0001 / pipes-network

Use network sockets together with the Haskell pipes library.
http://hackage.haskell.org/package/pipes-network
Other
24 stars 8 forks source link

socketReadS: Not obvious which should be the maximum number of bytes to receive at once. #1

Closed k0001 closed 11 years ago

k0001 commented 11 years ago

It's not obvious to the user which value should be used. See this related comment on reddit](http://www.reddit.com/r/haskell/comments/1ee1ks/a_very_simple_tcp_server_in_haskell/c9zdrba).

Maybe we should pick a default value, say 4096. However, I don't clearly understand the consequences of that choice.

For now, suggesting a default value in the documentation should be fine.

k0001 commented 11 years ago

Well, I think it's useful to be able to configure this value manually. In particular, for performance reasons when you know beforehand the number of bytes that you are expecting to deal with at a same time.

I just added a little comment in acd7cb658dbc3e2f39a671c4c8918420e4f88648