send and receive
handle connection error