Interface SocketService.OnIncoming

Enclosing class:
SocketService
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 SocketService.OnIncoming
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onIncoming(SocketConnection connection, Object source_object)
    The ::incoming signal is emitted when a new incoming connection
    to @service needs to be handled.
  • Method Details

    • 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.
      Parameters:
      connection - a new #GSocketConnection object
      source_object - the source_object passed to g_socket_listener_add_address()
      Returns:
      %TRUE to stop other handlers from being called