Close socket and sendall data