code: public synchronized int getSoTimeout() throws IOException {
          if (isClosed())
              throw new SocketException("Socket is closed");
          Object o = getImpl().getOption(SocketOptions.SO_TIMEOUT);
          /* extra type safety */
          if (o instanceof Integer) {
              return ((Integer) o).intValue();
          } else {
              return 0;
          }
      }
docs: Retrieve setting for SO_TIMEOUT.  0 returns implies that the
  option is disabled (i.e., timeout of infinity).
  @return the SO_TIMEOUT value
  @exception IOException if an I/O error occurs
  @since   JDK1.1
  @see #setSoTimeout(int)