Interface UDPSocket.OnMessageFunction<T>

Type Parameters:
T - message type
Enclosing class:
UDPSocket<T extends Serializable>
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 UDPSocket.OnMessageFunction<T>
Functional interface for message handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onMessage​(T message, String address, int port)
    Function to be called on message receive.
  • Method Details

    • onMessage

      void onMessage(T message, String address, int port)
      Function to be called on message receive.
      Parameters:
      message - content of the received message
      address - address of the sender socket
      port - port of the sender socket