Struct xpcom::interfaces::nsIUDPSocketListener [] [src]

#[repr(C)]
pub struct nsIUDPSocketListener { /* fields omitted */ }

interface nsIUDPSocketListener : nsISupports

Methods

impl nsIUDPSocketListener
[src]

[src]

Cast this nsIUDPSocketListener to one of its base interfaces.

impl nsIUDPSocketListener
[src]

[src]

/**
 * nsIUDPSocketListener
 *
 * This interface is notified whenever a UDP socket accepts a new connection.
 * The transport is in the connected state, and read/write streams can be opened
 * using the normal nsITransport API.  The address of the client can be found by
 * calling the nsISocketTransport::GetAddress method or by inspecting
 * nsISocketTransport::GetHost, which returns a string representation of the
 * client's IP address (NOTE: this may be an IPv4 or IPv6 string literal).
 */
/**
     * onPacketReceived
     *
     * This method is called when a client sends an UDP packet.
     *
     * @param aSocket
     *        The UDP socket.
     * @param aMessage
     *        The message.
     */

void onPacketReceived (in nsIUDPSocket aSocket, in nsIUDPMessage aMessage);

[src]

/**
     * onStopListening
     *
     * This method is called when the listening socket stops for some reason.
     * The UDP socket is effectively dead after this notification.
     *
     * @param aSocket
     *        The UDP socket.
     * @param aStatus
     *        The reason why the UDP socket stopped listening.  If the
     *        UDP socket was manually closed, then this value will be
     *        NS_BINDING_ABORTED.
     */

void onStopListening (in nsIUDPSocket aSocket, in nsresult aStatus);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIUDPSocketListener
[src]

IID: nsIID = nsID(776691155, 29528, 17025, [184, 31, 16, 198, 46, 243, 156, 181])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIUDPSocketListener
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIUDPSocketListener
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.