add shutdown function
convert send to sendall