<sb0>
whitequark, if I use send() instead of send_slice(), I save one data copy, correct?
<sb0>
is it correct that send() is giving me a pointer into the TCP buffer that I should fill myself right after calling the function?
<sb0>
it says "contiguous" free space. if the socket has just been connected, is it going to reliably give me all the space available in the TCP buffer?
<sb0>
(I want to use this for HTTP requests without supporting keepalive)
_whitelogger has joined #m-labs
<sb0>
whitequark, also I don't know what the length should be until I write the slice (e.g. using write_fmt ...)
<sb0>
whitequark, other than that, smoltcp is great work! it's really nice to be able to write your code on a PC first using the tap interface.
<whitequark>
sb0: re "save one data copy": correct
<whitequark>
"giving a pointer into TCP buffer" correct, TCP, UDP, whatever
<whitequark>
it says "contiguous" free space because if the TCP buffer's start of free data is 1 before the end, then it will give you a slice of length 1
<whitequark>
so yes, if it has just been connected, you will get the entirety of the buffer you've allocated
<whitequark>
and yeah, that's how I test everything too
<sb0>
whitequark, is it possible to get the largest possible slice first, then tell how many of it you've written and should be transmitted?
<sb0>
*how much
<whitequark>
not currently but I think I can support that
<GitHub64>
[artiq] jordens commented on issue #807: `artiq_run` does not implement controlled termination of experiments. You need to use the full `artiq_master` setup and graceful termination for that. https://github.com/m-labs/artiq/issues/807#issuecomment-318881683