replace static_visitor with visit
simplify the visit call
shutdown the socket after responding