Class SocketUDT

java.lang.Object
com.barchart.udt.SocketUDT

public class SocketUDT extends Object
UDT native socket wrapper

note: current implementation supports IPv4 only (no IPv6)

  • Field Details

    • DEFAULT_ACCEPT_QUEUE_SIZE

      public static final int DEFAULT_ACCEPT_QUEUE_SIZE
      Maximum number of connections queued in listening mode by accept()
      See Also:
    • DEFAULT_FILE_BLOCK_SIZE

      public static final int DEFAULT_FILE_BLOCK_SIZE
      Block size used by sendFile(File, long, long)
      See Also:
    • DEFAULT_MAX_SELECTOR_SIZE

      public static final int DEFAULT_MAX_SELECTOR_SIZE
      Maximum number sockets that can participate in a SelectorUDT.select() operation; see epoll.h to confirm current limit
      See Also:
    • DEFAULT_MIN_SELECTOR_TIMEOUT

      public static final int DEFAULT_MIN_SELECTOR_TIMEOUT
      Minimum timeout of a SelectorUDT.select() operations.
      See Also:
    • INFINITE_TTL

      public static final int INFINITE_TTL
      infinite message time to live;
      See Also:
    • INIT_OK

      @Native public static boolean INIT_OK
      Helper value that can be checked from CCC class and force JNI library load
    • log

      protected static final org.slf4j.Logger log
    • SIGNATURE_JNI

      @Native public static final int SIGNATURE_JNI
      JNI Signature that must match between java code and c++ code on all platforms; failure to match will abort native library load, as an indication of inconsistent build.
      See Also:
    • TIMEOUT_INFINITE

      public static final int TIMEOUT_INFINITE
      infinite timeout:

      blocking send/receive

      epoll wait

      See Also:
    • TIMEOUT_NONE

      public static long TIMEOUT_NONE
      zero timeout:

      epoll wait

    • UDT_EXCEPT_INDEX

      @Native public static final int UDT_EXCEPT_INDEX
      UDT::select() sizeArray/sizeBuffer index offset for EXCEPTION report
      See Also:
    • UDT_READ_INDEX

      @Native public static final int UDT_READ_INDEX
      UDT::select() sizeArray/sizeBuffer index offset for READ interest
      See Also:
    • UDT_SIZE_COUNT

      @Native public static final int UDT_SIZE_COUNT
      UDT::select() sizeArray/sizeBuffer size count or number of arrays/buffers
      See Also:
    • UDT_WRITE_INDEX

      @Native public static final int UDT_WRITE_INDEX
      UDT::select() sizeArray/sizeBuffer index offset for WRITE interest
      See Also:
    • listenQueueSize

      private volatile int listenQueueSize
      java copy of underlying native accept queue size parameter
      See Also:
    • localSocketAddress

      @Native private volatile InetSocketAddress localSocketAddress
      local end point; loaded by JNI by hasLoadedLocalSocketAddress()
    • messageIsOrdered

      private volatile boolean messageIsOrdered
    • messageTimeTolive

      private volatile int messageTimeTolive
    • monitor

      @Native private final MonitorUDT monitor
    • remoteSocketAddress

      @Native private volatile InetSocketAddress remoteSocketAddress
      remote end point; loaded by JNI by hasLoadedRemoteSocketAddress()
    • socketAddressFamily

      @Native private final int socketAddressFamily
      native address family; read by JNI

      TODO add support for AF_INET6

    • socketID

      @Native private final int socketID
      native descriptor; read by JNI; see udt.h "typedef int UDTSOCKET;"
    • type

      @Native private final TypeUDT type
  • Constructor Details

  • Method Details