Package org.gnome.soup
Interface Message.NetworkEventCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
Message
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface declaration of the
NetworkEventCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(SocketClientEvent event, IOStream connection) Emitted to indicate that some network-related event related tomsg
has occurred.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment)
method.default void
upcall
(MemorySegment sourceMessage, int event, MemorySegment connection) Theupcall
method is called from native code.
-
Method Details
-
run
Emitted to indicate that some network-related event related tomsg
has occurred.This essentially proxies the
Gio.SocketClient::event
signal, but only for events that occur whilemsg
"owns" the connection; ifmsg
is sent on an existing persistent connection, then this signal will not be emitted. (If you want to force the message to be sent on a new connection, set theMessageFlags.NEW_CONNECTION
flag on it.)See
Gio.SocketClient::event
for more information on what the different values ofevent
correspond to, and whatconnection
will be in each case. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gio.SocketClientEvent, org.gnome.gio.IOStream)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-