Trait enclave_runner::usercalls::AsyncListener [−][src]
pub trait AsyncListener: 'static + Send {
fn poll_accept(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
local_addr: Option<&mut String>,
peer_addr: Option<&mut String>
) -> Poll<Result<Option<Box<dyn AsyncStream>>>>;
}
Expand description
AsyncListener lets an implementation implement a slightly modified form of std::net::TcpListener::accept
.
Required methods
The enclave may optionally request the local or peer addresses
be returned in local_addr
or peer_addr
, respectively.
If local_addr
and/or peer_addr
are not None
, they will point to an empty String
.
On success, user-space can fill in the strings as appropriate.
The enclave must not make any security decisions based on the local address received.