Package libcore.io

Class StructLinger

java.lang.Object
libcore.io.StructLinger

public final class StructLinger
extends Object
Corresponds to C's struct linger from <sys/socket.h>
  • Field Summary

    Fields
    Modifier and Type Field Description
    int l_linger
    Linger time in seconds.
    int l_onoff
    Whether or not linger is enabled.
  • Constructor Summary

    Constructors
    Constructor Description
    StructLinger​(int l_onoff, int l_linger)  
  • Method Summary

    Modifier and Type Method Description
    boolean isOn()  
    String toString()
    Returns a string containing a concise, human-readable description of this object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • l_onoff

      public final int l_onoff
      Whether or not linger is enabled. Non-zero is on.
    • l_linger

      public final int l_linger
      Linger time in seconds.
  • Constructor Details

    • StructLinger

      public StructLinger​(int l_onoff, int l_linger)
  • Method Details

    • isOn

      public boolean isOn()
    • toString

      public String toString()
      Description copied from class: Object
      Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
         getClass().getName() + '@' + Integer.toHexString(hashCode())

      See Writing a useful toString method if you intend implementing your own toString method.

      Overrides:
      toString in class Object
      Returns:
      a printable representation of this object.