/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/** *nsIServerSocket * *Aninterfacetoaserversocketthatcanacceptincomingconnections.
*/
[scriptable, builtinclass, uuid(7a9c39cb-a13f-4eef-9bdf-a74301628742)]
interface nsIServerSocket : nsISupports
{ /** *@nameServerSocketFlags *Theseflagsdefinevarioussocketoptions. *@{
*/ /// The server socket will only respond to connections on the /// local loopback interface. Otherwise, it will accept connections /// from any interface. To specify a particular network interface, /// use initWithAddress. const nsServerSocketFlag LoopbackOnly = 0x00000001; /// The server socket will not be closed when Gecko is set /// offline. const nsServerSocketFlag KeepWhenOffline = 0x00000002; /** @} */
/** *init * *Thismethodinitializesaserversocket. * *@paramaPort *Theportoftheserversocket.Pass-1toindicatenopreference, *andaportwillbeselectedautomatically. *@paramaLoopbackOnly *Iftrue,theserversocketwillonlyrespondtoconnectionsonthe *localloopbackinterface.Otherwise,itwillacceptconnections *fromanyinterface.Tospecifyaparticularnetworkinterface, *useinitWithAddress. *@paramaBackLog *Themaximumlengththequeueofpendingconnectionsmaygrowto. *Thisparametermaybesilentlylimitedbytheoperatingsystem. *Pass-1tousethedefaultvalue.
*/ void init(in long aPort,
in boolean aLoopbackOnly,
in long aBackLog);
/** *thesameasinit(),butinitializesanIPv6serversocket
*/ void initIPv6(in long aPort,
in boolean aLoopbackOnly,
in long aBackLog);
/** *Similartoinit(),butinitializesaserversocketthatsupports *bothIPv4andIPv6.
*/ void initDualStack(in long aPort,
in long aBackLog);
/** *initSpecialConnection * *Thismethodinitializesaserversocketandofferstheabilitytohave *thatsocketnotgetterminatedifGeckoissetoffline. * *@paramaPort *Theportoftheserversocket.Pass-1toindicatenopreference, *andaportwillbeselectedautomatically. *@paramaFlags *Flagsforthesocket. *@paramaBackLog *Themaximumlengththequeueofpendingconnectionsmaygrowto. *Thisparametermaybesilentlylimitedbytheoperatingsystem. *Pass-1tousethedefaultvalue.
*/ void initSpecialConnection(in long aPort,
in nsServerSocketFlag aFlags,
in long aBackLog);
/** *initWithAddress * *Thismethodinitializesaserversocket,andbindsittoaparticular *localaddress(andhenceaparticularlocalnetworkinterface). * *@paramaAddr *Theaddresstowhichthisserversocketshouldbebound. *@paramaBackLog *Themaximumlengththequeueofpendingconnectionsmaygrowto. *Thisparametermaybesilentlylimitedbytheoperatingsystem. *Pass-1tousethedefaultvalue.
*/
[noscript] void initWithAddress([const] in PRNetAddrPtr aAddr, in long aBackLog);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.