public class AsyncHandle extends Handle
See Async handle
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the handle and free up any resources that may be held by it.
|
int |
send()
Wake up the event loop and call the specified callback.
|
void |
setAsyncCallback(AsyncCallback callback)
Attach a
AsyncCallback. |
public void setAsyncCallback(AsyncCallback callback)
AsyncCallback.callback - A callback, which will be executed after a loop will receive
an async signal from this handle.IllegalStateException - if this method called more than once.public int send()
It's safe to call this function from any thread. The callback will be called on the loop thread.
0 on success, or an error code < 0 on failure.#setAsyncCallback(AsyncCallback)}public void close()
CloseCallback callback will be invoked right before the close.
#setCloseCallback(CloseCallback)}Copyright © 2021 WebFolder. All rights reserved.