Schnittstelle SocketService.OnIncoming

Umschließende Klasse:
SocketService
Funktionsschnittstelle:
Dies ist eine funktionale Schnittstelle, die somit als Zuweisungsziel für einen Lambdaausdruck oder eine Methodenreferenz verwendet werden kann.

@FunctionalInterface public static interface SocketService.OnIncoming
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    boolean
    onIncoming(SocketConnection connection, Object source_object)
    The ::incoming signal is emitted when a new incoming connection
    to @service needs to be handled.
  • Methodendetails

    • onIncoming

      boolean onIncoming(@Nonnull SocketConnection connection, @Nullable Object source_object)
      The ::incoming signal is emitted when a new incoming connection
      to @service needs to be handled. The handler must initiate the
      handling of @connection, but may not block; in essence,
      asynchronous operations must be used.

      @connection will be unreffed once the signal handler returns,
      so you need to ref it yourself if you are planning to use it.
      Parameter:
      connection - a new #GSocketConnection object
      source_object - the source_object passed to g_socket_listener_add_address()
      Gibt zurück:
      %TRUE to stop other handlers from being called