reconnect when send
 set encoding and endian