Interface AFSocketExtensions

All Known Subinterfaces:
All Known Implementing Classes:
AFDatagramChannel, AFDatagramSocket, AFSocket, AFSocketChannel, AFUNIXDatagramChannel, AFUNIXDatagramSocket, AFUNIXSocket, AFUNIXSocketChannel

public interface AFSocketExtensions
Defines certain methods that all junixsocket socket implementations share and extend beyond the standard socket API. The set of features include methods to support working with ancillary messages (such as file descriptors) as well as socket credentials. Keep in mind that the platform this code runs on may not support these features, and exceptions may be thrown when not checking for the corresponding AFSocketCapability first.
Christian Kohlschütter
  • Method Details

    • getAncillaryReceiveBufferSize

      int getAncillaryReceiveBufferSize()
      Returns the size of the receive buffer for ancillary messages (in bytes).
      The size.
    • setAncillaryReceiveBufferSize

      void setAncillaryReceiveBufferSize(int size)
      Sets the size of the receive buffer for ancillary messages (in bytes). To disable handling ancillary messages, set it to 0 (default).
      size - The size.
    • ensureAncillaryReceiveBufferSize

      void ensureAncillaryReceiveBufferSize(int minSize)
      Ensures a minimum ancillary receive buffer size.
      minSize - The minimum size (in bytes).