Hello Moses,
we indeed confused ourselves. The buffers i hand to send() and recv() are reused for each connection. Also, i am not creating a separate task for each connection. My applications consists of a single task looping over the accept() calls and serving the connections.
It seems that the shutdown() call does not free the memory allocated with accept(). Maybe this is a bug in the NDK?
Best regards