完善udp超时关闭.

Signed-off-by: jack <jack.wgm@gmail.com>
使用std::memcpy替换write_string, write_string可能导致写入错误的数据.

Signed-off-by: jack <jack.wgm@gmail.com>