iptube/SPUDlib

Socket calls or callbacks?

palerikm opened this issue · 1 comments

Should spudlib do a send()? Or rely on the application to provide a callback so it can send the packets on the applications behalf?

A discussion regarding portability and ease of implementing into existing stacks would be good. Maybe supporting both the above scenarios at compile time is a viable option?

tube_set_socket_functions() does most of what you want at relatively low overhead both at runtime as well as for the programmer. For evidence, see _mock_sendmsg and _mock_recvmsg in tube_test.c. I'm open to doing more; perhaps getting this running on Windows as well as a more... "custom" operating system would give us more specific requirements.