Add method to check connection state.