VZVirtioSocketListenerDelegate

Trait VZVirtioSocketListenerDelegate 

Source
pub unsafe trait VZVirtioSocketListenerDelegate: NSObjectProtocol {
    // Provided method
    unsafe fn listener_shouldAcceptNewConnection_fromSocketDevice(
        &self,
        listener: &VZVirtioSocketListener,
        connection: &VZVirtioSocketConnection,
        socket_device: &VZVirtioSocketDevice,
    ) -> bool
       where Self: Sized + Message { ... }
}
Available on crate feature VZVirtioSocketListener only.
Expand description

Delegate object for VZVirtioSocketListener.

A class conforming to VZVirtioSocketListenerDelegate protocol can provide a method to establish a new connection to the socket.

See: VZVirtioSocketDevice

See: VZVirtioSocketListener

See: VZVirtioSocketConnection

See also Apple’s documentation

Provided Methods§

Source

unsafe fn listener_shouldAcceptNewConnection_fromSocketDevice( &self, listener: &VZVirtioSocketListener, connection: &VZVirtioSocketConnection, socket_device: &VZVirtioSocketDevice, ) -> bool
where Self: Sized + Message,

Available on crate features VZSocketDevice and VZVirtioSocketConnection and VZVirtioSocketDevice only.

Invoked when the Virtio socket device is accepting a new connection.

Parameter listener: The listener invoking the delegate method.

Parameter connection: The new connection to be established.

Parameter socketDevice: The Virtio socket device with which the new connection is to be established.

Returns: YES if the connection should be established, NO otherwise.

The VZVirtioSocketConnection object owns a file descriptor for this connection. Data can be sent and received through that file descriptor. If the connection is accepted, the implementation should keep a reference to the connection object to send and receive data.

Trait Implementations§

Source§

impl ProtocolType for dyn VZVirtioSocketListenerDelegate

Source§

const NAME: &'static str = "VZVirtioSocketListenerDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn VZVirtioSocketListenerDelegate

Implementations on Foreign Types§

Source§

impl<T> VZVirtioSocketListenerDelegate for ProtocolObject<T>

Implementors§