Destroys the socket.
~basic_datagram_socket();
This function destroys the socket, cancelling any outstanding asynchronous operations associated with the socket as if by calling cancel.
cancel