Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIServerSocketListener Interface Reference

nsIServerSocketListener More...

import "nsIServerSocket.idl";

Inheritance diagram for nsIServerSocketListener:
Inheritance graph
[legend]
Collaboration diagram for nsIServerSocketListener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void onSocketAccepted (in nsIServerSocket aServ, in nsISocketTransport aTransport)
 onSocketAccepted
void onStopListening (in nsIServerSocket aServ, in nsresult aStatus)
 onStopListening

Detailed Description

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).

Definition at line 144 of file nsIServerSocket.idl.


Member Function Documentation

onSocketAccepted

This method is called when a client connection is accepted.

Parameters:
aServThe server socket.
aTransportThe connected socket transport.

onStopListening

This method is called when the listening socket stops for some reason. The server socket is effectively dead after this notification.

Parameters:
aServThe server socket.
aStatusThe reason why the server socket stopped listening. If the server socket was manually closed, then this value will be NS_BINDING_ABORTED.

The documentation for this interface was generated from the following file: