Class DTLSServer

All Implemented Interfaces:
Runnable, NetworkApplication, NetServer

public class DTLSServer extends UDPServer
TLS server for UDP sockets (DTLS).
API Note:
Before version 2.1.0, this class was in package org.omegazero.net.server.
  • Constructor Details

  • Method Details

    • setSupportedApplicationLayerProtocols

      public void setSupportedApplicationLayerProtocols(String[] supportedApplicationLayerProtocols)
      Sets the list of supported application layer protocol names to be negotiated using TLS ALPN (Application Layer Protocol Negotiation). The elements in this list should be ordered from most-preferred to least-preferred protocol name.

      If not set or null is passed, the first protocol name presented by the client is selected. If the client does not request ALPN, this list is ignored.
      Parameters:
      supportedApplicationLayerProtocols - The list of supported protocol names
    • getSupportedApplicationLayerProtocols

      public String[] getSupportedApplicationLayerProtocols()
      Returns:
      The list of configured supported application layer protocol names, or null of none were configured
    • handleConnection

      protected ChannelConnection handleConnection(SelectionKey serverKey, SocketAddress remote) throws IOException
      Specified by:
      handleConnection in class UDPServer
      Throws:
      IOException