Struct xpcom::interfaces::nsIServerSocketListener
[−]
[src]
#[repr(C)]pub struct nsIServerSocketListener { /* fields omitted */ }
interface nsIServerSocketListener : nsISupports
Methods
impl nsIServerSocketListener
[src]
pub fn coerce<T: nsIServerSocketListenerCoerce>(&self) -> &T
[src]
Cast this nsIServerSocketListener
to one of its base interfaces.
impl nsIServerSocketListener
[src]
pub unsafe fn OnSocketAccepted(
&self,
aServ: *const nsIServerSocket,
aTransport: *const nsISocketTransport
) -> nsresult
[src]
&self,
aServ: *const nsIServerSocket,
aTransport: *const nsISocketTransport
) -> nsresult
/**
* nsIServerSocketListener
*
* This interface is notified whenever a server 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).
*/
/**
* onSocketAccepted
*
* This method is called when a client connection is accepted.
*
* @param aServ
* The server socket.
* @param aTransport
* The connected socket transport.
*/
void onSocketAccepted (in nsIServerSocket aServ, in nsISocketTransport aTransport);
pub unsafe fn OnStopListening(
&self,
aServ: *const nsIServerSocket,
aStatus: nsresult
) -> nsresult
[src]
&self,
aServ: *const nsIServerSocket,
aStatus: nsresult
) -> nsresult
/**
* onStopListening
*
* This method is called when the listening socket stops for some reason.
* The server socket is effectively dead after this notification.
*
* @param aServ
* The server socket.
* @param aStatus
* The reason why the server socket stopped listening. If the
* server socket was manually closed, then this value will be
* NS_BINDING_ABORTED.
*/
void onStopListening (in nsIServerSocket aServ, 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 nsIServerSocketListener
[src]
const IID: nsIID
IID: nsIID = nsID(2204997868, 65250, 19422, [182, 9, 171, 213, 233, 102, 234, 189])
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 nsIServerSocketListener
[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 nsIServerSocketListener
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.