contiki-os/contiki — pull request #899 by g-oikonomou (2014-12-08 22:20:24+00:00)
Title: Allow specifying a max outgoing segment size per TCP socket

I'm working on a TCP-heavy project which combines two things:

* An HTTPD
* A bespoke TCP client

I've found that the HTTPD benefits from long segments (and fragmentation at the 6LoWPAN layer), while the TCP client is a lot more stable with smaller segments and zero fragmentation. Thus, there is no single best value for `UIP_CONF_TCP_MSS` which would satisfy the requirements of both apps.

What I am proposing here is to add the ability to specify MSS on a per-socket basis. Naturally, the remote can still reduce it even further. This is not dis-similar to what one would do with `setsockopt` (`TCP_MAXSEG` option), but I've chosen not to disturb our TCP sockets API: The interested application will have to write directly to the relevant field in the TCP socket struct.

Default is set to `uip_mss()`