[backend] Clean up UDP code.