Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  TCPServerSocketChild.cpp

  Sprache: C
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */


#include "TCPServerSocketChild.h"

#include "TCPServerSocket.h"
#include "TCPSocketChild.h"
#include "jsfriendapi.h"
#include "mozilla/dom/BrowserChild.h"
#include "mozilla/dom/PBrowserChild.h"
#include "mozilla/net/NeckoChild.h"
#include "nsJSUtils.h"

using mozilla::net::gNeckoChild;

namespace mozilla::dom {

NS_IMPL_CYCLE_COLLECTION(TCPServerSocketChild, mServerSocket)
NS_IMPL_CYCLE_COLLECTING_ADDREF(TCPServerSocketChild)
NS_IMPL_CYCLE_COLLECTING_RELEASE(TCPServerSocketChild)

NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TCPServerSocketChild)
  NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END

// static
RefPtr<TCPServerSocketChild> TCPServerSocketChild::Create(
    TCPServerSocket* aServerSocket, uint16_t aLocalPort, uint16_t aBacklog,
    bool aUseArrayBuffers) {
  // c'tor is private, so we can't use fancy things like MakeRefPtr
  RefPtr<TCPServerSocketChild> result(new TCPServerSocketChild(aServerSocket));
  gNeckoChild->SendPTCPServerSocketConstructor(result, aLocalPort, aBacklog,
                                               aUseArrayBuffers);
  return result;
}

TCPServerSocketChild::TCPServerSocketChild(TCPServerSocket* aServerSocket)
    : mServerSocket(aServerSocket) {}

TCPServerSocketChild::~TCPServerSocketChild() = default;

mozilla::ipc::IPCResult TCPServerSocketChild::RecvCallbackAccept(
    mozilla::NotNull<PTCPSocketChild*> psocket) {
  RefPtr<TCPSocketChild> socket = static_cast<TCPSocketChild*>(psocket.get());
  nsresult rv = mServerSocket->AcceptChildSocket(socket);
  NS_ENSURE_SUCCESS(rv, IPC_OK());
  return IPC_OK();
}

void TCPServerSocketChild::Close() { SendClose(); }

}  // namespace mozilla::dom

Messung V0.5 in Prozent
C=97 H=100 G=98

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-08-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=434850
#Domains=661743