Interface QuicServer.DatagramSink

Enclosing class:
QuicServer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface QuicServer.DatagramSink
Where an unbound server's datagrams go: the transport it runs over instead of a socket.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called for each datagram the server sends, from its connections' threads (several at once) and from threads that hand it datagrams (its answers, such as Version Negotiation): it should not block for long.
  • Method Details

    • send

      void send(ByteBuffer datagram, InetSocketAddress to)
      Called for each datagram the server sends, from its connections' threads (several at once) and from threads that hand it datagrams (its answers, such as Version Negotiation): it should not block for long.
      Parameters:
      datagram - the datagram, between its position and limit; the sink may keep it
      to - the receiver