static DProtocol createFromSocket(Socket s,SessionManager sessionManager) throws IOException {
  applyBaseSocketSettings(s);
  int socketTimeout=sessionManager.getPreference(SessionManager.PREF_SOCKET_TIMEOUT);
  boolean checkSocket=false;
  if (socketTimeout > 0) {
    s.setSoTimeout(socketTimeout);
    checkSocket=true;
  }
  return createDProtocolFromSocket(s,checkSocket);
}

static DProtocol createFromSocket ( Socket s , SessionManager sessionManager ) throws IOException { applyBaseSocketSettings ( s ) ; int socketTimeout = sessionManager . getPreference ( SessionManager . PREF_SOCKET_TIMEOUT ) ; boolean checkSocket = false ; if ( socketTimeout > 0 ) { s . setSoTimeout ( socketTimeout ) ; checkSocket = true ; } return createDProtocolFromSocket ( s , checkSocket ) ; }
build a dprotocol object from a the given socket connection and applies socket specific settings set in sessionmanager like socket timeout .
