Should work for UDP too.