pub struct QipcrtrSocket { /* private fields */ }Implementations§
Source§impl QipcrtrSocket
impl QipcrtrSocket
pub fn new(_socket_type: SocketType) -> Self
Trait Implementations§
Source§impl SocketOps for QipcrtrSocket
impl SocketOps for QipcrtrSocket
Source§fn connect(
&self,
_socket: &SocketHandle,
_current_task: &CurrentTask,
peer: SocketPeer,
) -> Result<(), Errno>
fn connect( &self, _socket: &SocketHandle, _current_task: &CurrentTask, peer: SocketPeer, ) -> Result<(), Errno>
Connect the
socket to the listening peer. On success
a new socket is created and added to the accept queue.Source§fn listen(
&self,
_socket: &Socket,
_backlog: i32,
_credentials: ucred,
) -> Result<(), Errno>
fn listen( &self, _socket: &Socket, _backlog: i32, _credentials: ucred, ) -> Result<(), Errno>
Start listening at the bound address for
connect calls.Source§fn accept(
&self,
_socket: &Socket,
_current_task: &CurrentTask,
) -> Result<SocketHandle, Errno>
fn accept( &self, _socket: &Socket, _current_task: &CurrentTask, ) -> Result<SocketHandle, Errno>
Returns the eariest socket on the accept queue of this
listening socket. Returns EAGAIN if the queue is empty.
Source§fn bind(
&self,
_socket: &Socket,
_current_task: &CurrentTask,
socket_address: SocketAddress,
) -> Result<(), Errno>
fn bind( &self, _socket: &Socket, _current_task: &CurrentTask, socket_address: SocketAddress, ) -> Result<(), Errno>
Binds this socket to a
socket_address. Read moreSource§fn read(
&self,
_socket: &Socket,
_current_task: &CurrentTask,
data: &mut dyn OutputBuffer,
flags: SocketMessageFlags,
) -> Result<MessageReadInfo, Errno>
fn read( &self, _socket: &Socket, _current_task: &CurrentTask, data: &mut dyn OutputBuffer, flags: SocketMessageFlags, ) -> Result<MessageReadInfo, Errno>
Reads the specified number of bytes from the socket, if possible. Read more
Source§fn write(
&self,
_socket: &Socket,
_current_task: &CurrentTask,
data: &mut dyn InputBuffer,
dest_address: &mut Option<SocketAddress>,
_ancillary_data: &mut Vec<AncillaryData>,
) -> Result<usize, Errno>
fn write( &self, _socket: &Socket, _current_task: &CurrentTask, data: &mut dyn InputBuffer, dest_address: &mut Option<SocketAddress>, _ancillary_data: &mut Vec<AncillaryData>, ) -> Result<usize, Errno>
Writes the data in the provided user buffers to this socket. Read more
Source§fn wait_async(
&self,
_socket: &Socket,
_current_task: &CurrentTask,
waiter: &Waiter,
events: FdEvents,
handler: EventHandler,
) -> WaitCanceler
fn wait_async( &self, _socket: &Socket, _current_task: &CurrentTask, waiter: &Waiter, events: FdEvents, handler: EventHandler, ) -> WaitCanceler
Queues an asynchronous wait for the specified
events
on the waiter. Note that no wait occurs until a
wait functions is called on the waiter. Read moreSource§fn query_events(
&self,
_socket: &Socket,
_current_task: &CurrentTask,
) -> Result<FdEvents, Errno>
fn query_events( &self, _socket: &Socket, _current_task: &CurrentTask, ) -> Result<FdEvents, Errno>
Return the events that are currently active on the
socket.Source§fn shutdown(
&self,
_socket: &Socket,
_how: SocketShutdownFlags,
) -> Result<(), Errno>
fn shutdown( &self, _socket: &Socket, _how: SocketShutdownFlags, ) -> Result<(), Errno>
Shuts down this socket according to how, preventing any future reads and/or writes. Read more
Source§fn getsockname(&self, _socket: &Socket) -> Result<SocketAddress, Errno>
fn getsockname(&self, _socket: &Socket) -> Result<SocketAddress, Errno>
Returns the name of this socket. Read more
Source§fn getpeername(&self, _socket: &Socket) -> Result<SocketAddress, Errno>
fn getpeername(&self, _socket: &Socket) -> Result<SocketAddress, Errno>
Returns the name of the peer of this socket, if such a peer exists. Read more
Source§fn setsockopt(
&self,
_socket: &Socket,
current_task: &CurrentTask,
level: u32,
optname: u32,
optval: SockOptValue,
) -> Result<(), Errno>
fn setsockopt( &self, _socket: &Socket, current_task: &CurrentTask, level: u32, optname: u32, optval: SockOptValue, ) -> Result<(), Errno>
Sets socket-specific options.
Source§fn getsockopt(
&self,
_socket: &Socket,
_current_task: &CurrentTask,
level: u32,
optname: u32,
_optlen: u32,
) -> Result<Vec<u8>, Errno>
fn getsockopt( &self, _socket: &Socket, _current_task: &CurrentTask, level: u32, optname: u32, _optlen: u32, ) -> Result<Vec<u8>, Errno>
Retrieves socket-specific options.
Source§fn get_socket_info(
&self,
) -> Result<(SocketDomain, SocketType, SocketProtocol), Errno>
fn get_socket_info( &self, ) -> Result<(SocketDomain, SocketType, SocketProtocol), Errno>
Returns the domain, type and protocol of the socket. This is only used for socket that are
build without previous knowledge of this information, and can be ignored if all sockets are
build with it.
Source§fn ioctl(
&self,
_socket: &Socket,
_file: &FileObject,
_current_task: &CurrentTask,
_request: u32,
_arg: SyscallArg,
) -> Result<SyscallResult, Errno>
fn ioctl( &self, _socket: &Socket, _file: &FileObject, _current_task: &CurrentTask, _request: u32, _arg: SyscallArg, ) -> Result<SyscallResult, Errno>
Implements ioctl.
Source§fn to_handle(
&self,
_socket: &Socket,
_current_task: &CurrentTask,
) -> Result<Option<NullableHandle>, Errno>
fn to_handle( &self, _socket: &Socket, _current_task: &CurrentTask, ) -> Result<Option<NullableHandle>, Errno>
Return a handle that allows access to this file descritor through the zxio protocols. Read more
Auto Trait Implementations§
impl !Freeze for QipcrtrSocket
impl !RefUnwindSafe for QipcrtrSocket
impl Send for QipcrtrSocket
impl Sync for QipcrtrSocket
impl Unpin for QipcrtrSocket
impl UnsafeUnpin for QipcrtrSocket
impl UnwindSafe for QipcrtrSocket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more