* @return true if the client is connected, false otherwise
*
* @since 0.2.0
*/
public boolean isConnected() {
State state = (transport == null) ? null : transport.getState();
int value = (state == null) ? TransportProtocolState.DISCONNECTED
: state.getValue();
return ((value == TransportProtocolState.CONNECTED) ||
(value == TransportProtocolState.PERFORMING_KEYEXCHANGE));
}