Reliable transmission, sending state machine