pub enum UnixDomainSocketRequest {
Clone2 {
request: ServerEnd<CloneableMarker>,
control_handle: UnixDomainSocketControlHandle,
},
Close {
responder: UnixDomainSocketCloseResponder,
},
Query {
responder: UnixDomainSocketQueryResponder,
},
GetEvent {
payload: UnixDomainSocketGetEventRequest,
responder: UnixDomainSocketGetEventResponder,
},
Read {
payload: UnixDomainSocketReadRequest,
responder: UnixDomainSocketReadResponder,
},
Write {
payload: UnixDomainSocketWriteRequest,
responder: UnixDomainSocketWriteResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: UnixDomainSocketControlHandle,
method_type: MethodType,
},
}
Expand description
A Unix Domain Socket
This protocol is used to implement a unix domain socket in a Fuchsia Component that will be able to communicate with a socket in Starnix. That socket will be able to transmit file descriptors.
Variants§
Clone2
Close
Terminates the connection.
After calling Close
, the client must not send any other requests.
Servers, after sending the status response, should close the connection regardless of status and without sending an epitaph.
Closing the client end of the channel should be semantically equivalent
to calling Close
without knowing when the close has completed or its
status.
Fields
responder: UnixDomainSocketCloseResponder
Query
Fields
responder: UnixDomainSocketQueryResponder
GetEvent
Returns an EventPair that will allow Starnix to wait on the socket. This event must use:
fio.FileSignal.READABLE
to signal that a message is available.fio.FileSignal.WRITABLE
to signal that it can accept a new message.ZX_EVENTPAIR_PEER_CLOSED
to signal that it is closed.
Read
Read a message from the socket.
Write
Write a message to the socket.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: UnixDomainSocketControlHandle
method_type: MethodType
Implementations§
Source§impl UnixDomainSocketRequest
impl UnixDomainSocketRequest
pub fn into_clone2( self, ) -> Option<(ServerEnd<CloneableMarker>, UnixDomainSocketControlHandle)>
pub fn into_close(self) -> Option<UnixDomainSocketCloseResponder>
pub fn into_query(self) -> Option<UnixDomainSocketQueryResponder>
pub fn into_get_event( self, ) -> Option<(UnixDomainSocketGetEventRequest, UnixDomainSocketGetEventResponder)>
pub fn into_read( self, ) -> Option<(UnixDomainSocketReadRequest, UnixDomainSocketReadResponder)>
pub fn into_write( self, ) -> Option<(UnixDomainSocketWriteRequest, UnixDomainSocketWriteResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL