They arent actually using TCP_CORK though (its not portable), they are just constructing a cork-like behaviour, using writev to write all the parts at once.
BTW, from my link: "If you need to write multiple buffers that are currently in memory you should prefer the gather function writev() before considering TCP_CORK with multiple calls to write()."