Struct xpcom::interfaces::nsIUDPSocketListener
[−]
[src]
#[repr(C)]pub struct nsIUDPSocketListener { /* fields omitted */ }
interface nsIUDPSocketListener : nsISupports
Methods
impl nsIUDPSocketListener
[src]
pub fn coerce<T: nsIUDPSocketListenerCoerce>(&self) -> &T
[src]
Cast this nsIUDPSocketListener
to one of its base interfaces.
impl nsIUDPSocketListener
[src]
pub unsafe fn OnPacketReceived(
&self,
aSocket: *const nsIUDPSocket,
aMessage: *const nsIUDPMessage
) -> nsresult
[src]
&self,
aSocket: *const nsIUDPSocket,
aMessage: *const nsIUDPMessage
) -> nsresult
/**
* 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);
pub unsafe fn OnStopListening(
&self,
aSocket: *const nsIUDPSocket,
aStatus: nsresult
) -> nsresult
[src]
&self,
aSocket: *const nsIUDPSocket,
aStatus: nsresult
) -> nsresult
/**
* 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>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIUDPSocketListener
[src]
const IID: nsIID
IID: nsIID = nsID(776691155, 29528, 17025, [184, 31, 16, 198, 46, 243, 156, 181])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIUDPSocketListener
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.